Skip to content

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented Jul 27, 2022

Looks like MPSGraph generates a wrong shader for expanding column into a matrix, though datatype should not really matter for scatter-gather ops, should it?

Also, fix minor typo: c10::ScalarType:Char is signed type, whereas c10::ScalarType::Byte is unsigned.

Workarounds #82305 by aliasing tensors of uint8 types to int8 typed ones

@malfet malfet requested a review from albanD July 27, 2022 14:21
@malfet malfet requested a review from kulinseth as a code owner July 27, 2022 14:21
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 27, 2022
Copy link
Contributor

@janeyx99 janeyx99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct

Copy link
Collaborator

@kulinseth kulinseth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, its okay to have this workaround. But we need to investigate the generated Graph as to why uint8 data type is not support.

@malfet
Copy link
Contributor Author

malfet commented Jul 27, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge and created land time checks. See merge status here and land check progress here

pytorchmergebot pushed a commit that referenced this pull request Jul 27, 2022
Looks like MPSGraph generates a wrong shader for expanding column into a matrix, though datatype should not really matter for scatter-gather ops, should it?

Also, fix minor typo: `c10::ScalarType:Char` is signed type, whereas `c10::ScalarType::Byte` is unsigned.

Workarounds #82305 by aliasing tensors of `uint8` types to `int8` typed ones

Pull Request resolved: #82315
Approved by: https://github.com/janeyx99, https://github.com/kulinseth
@github-actions
Copy link
Contributor

Hey @malfet.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Jul 28, 2022
Summary:
Looks like MPSGraph generates a wrong shader for expanding column into a matrix, though datatype should not really matter for scatter-gather ops, should it?

Also, fix minor typo: `c10::ScalarType:Char` is signed type, whereas `c10::ScalarType::Byte` is unsigned.

Workarounds #82305 by aliasing tensors of `uint8` types to `int8` typed ones

Pull Request resolved: #82315
Approved by: https://github.com/janeyx99, https://github.com/kulinseth

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/47b03ad42e10b4bf6602c1d5bcb82079800e67b5

Reviewed By: osalpekar

Differential Revision: D38234366

Pulled By: malfet

fbshipit-source-id: 87b7652176c2e73c9e523995999e27e8e5a79381
malfet added a commit that referenced this pull request Feb 1, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532
pytorchmergebot pushed a commit that referenced this pull request Feb 1, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532

Pull Request resolved: #118902
Approved by: https://github.com/kit1980
pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
And use convenient methods

TODO was added by an accidental copy-n-paste of code from #82315 into  #88532

Pull Request resolved: #118902
Approved by: https://github.com/kit1980
@github-actions github-actions bot deleted the malfet/mps-fix-uint8-expand-bug branch February 18, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request cla signed Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants