Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MLIR][TORCH] Add E2E support for aten.to.dtype_layout op #812

Merged
merged 1 commit into from
May 3, 2022

Conversation

vivekkhandelwal1
Copy link
Collaborator

This commit decomposes aten.to.dtype_layout op into aten.to.dtype op.

Signed-Off By: Vivek Khandelwal [email protected]

@vivekkhandelwal1 vivekkhandelwal1 requested review from cathyzhyi, silvasean and pashu123 and removed request for cathyzhyi April 28, 2022 13:47
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@cathyzhyi cathyzhyi left a comment

Choose a reason for hiding this comment

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

Mostly good. just one last comment.

lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
@vivekkhandelwal1 vivekkhandelwal1 force-pushed the aten-to-dtype-layout branch 2 times, most recently from 50c402a to 857ed0f Compare May 2, 2022 06:59
@vivekkhandelwal1 vivekkhandelwal1 requested a review from cathyzhyi May 2, 2022 06:59
Copy link
Contributor

@cathyzhyi cathyzhyi left a comment

Choose a reason for hiding this comment

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

just one nit.

lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
This commit decomposes `aten.to.dtype_layout` op into `aten.to.dtype` op.
This commit also fixes the formatting for the file type_conversion.py.

Signed-Off By: Vivek Khandelwal <[email protected]>
@vivekkhandelwal1 vivekkhandelwal1 merged commit c0634bc into llvm:main May 3, 2022
@vivekkhandelwal1 vivekkhandelwal1 deleted the aten-to-dtype-layout branch May 3, 2022 07:19
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this pull request Oct 3, 2022
* readme to be kept in sync, looks like on window, the softlink is transformed in something else (llvm#810)

Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Windows instrumentation support (llvm#801)

* Windows instrumentation support

Signed-off-by: Nathaniel McVicar <[email protected]>

* Normalize memory reporting to kb

Signed-off-by: Nathaniel McVicar <[email protected]>

Co-authored-by: Kevin O'Brien <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Test expected errors for shape inference (llvm#805)

* LIT tests for error in shape inference

Signed-off-by: Tung D. Le <[email protected]>

* Add more ops

Signed-off-by: Tung D. Le <[email protected]>

* Tests RNNOps

Signed-off-by: Tung D. Le <[email protected]>

* Add tests for more ops

Signed-off-by: Tung D. Le <[email protected]>

* Undo a change

Signed-off-by: Tung D. Le <[email protected]>

* Capitalize column

Signed-off-by: Tung D. Le <[email protected]>

Co-authored-by: chentong319 <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Set alignment for LLVM GlobalOp (llvm#812)

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* z/OS instrumentation support (llvm#813)

Signed-off-by: Steven Royer <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* ONNX backend test  for constant inputs (llvm#815)

* Test the first input as constant

Signed-off-by: Tung D. Le <[email protected]>

* Set contant inputs by IMPORTER_FORCE_CONSTANT

Signed-off-by: Tung D. Le <[email protected]>

* Add a new check-backend-constant

Signed-off-by: Tung D. Le <[email protected]>

* Add constant tests to Jenkins; Add doc for constant tests

Signed-off-by: Tung D. Le <[email protected]>

* Clean up

Signed-off-by: Tung D. Le <[email protected]>

* Typos

Signed-off-by: Tung D. Le <[email protected]>

* Only compile models in the backend run for constant test

Signed-off-by: Tung D. Le <[email protected]>

* Fix a wrong key

Signed-off-by: Tung D. Le <[email protected]>

* Rename test_to_enable_static_dynamic to test_to_enable_dict

Signed-off-by: Tung D. Le <[email protected]>

* Update on test failed

Signed-off-by: Tung D. Le <[email protected]>

Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Prepare to upgrade squeeze to OpSet 13 (llvm#804)

* pass compile

Signed-off-by: Tong Chen <[email protected]>

* control and test

Signed-off-by: Tong Chen <[email protected]>

* fix

Signed-off-by: Tong Chen <[email protected]>

* format

Signed-off-by: Tong Chen <[email protected]>

* format

Signed-off-by: Tong Chen <[email protected]>

* docs

Signed-off-by: Tong Chen <[email protected]>

* remove debug print

Signed-off-by: Tong Chen <[email protected]>

Co-authored-by: Kevin O'Brien <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Add the data_layout attribute to ModuleOp to denote endianness (llvm#819)

* Annotate ModuleOp with endian information

Signed-off-by: Tung D. Le <[email protected]>

* Enable failed end-to-end tests caused by constant inputs

Signed-off-by: Tung D. Le <[email protected]>

* Add lit tests for ModuleOp

Signed-off-by: Tung D. Le <[email protected]>
Signed-off-by: Yasushi Negishi <[email protected]>

* Add optimization rules for unnecessary reshape ops.

Signed-off-by: Yasushi Negishi <[email protected]>

* Fix compile errors

Signed-off-by: Yasushi Negishi <[email protected]>

* Fix issues of RemoveIdentityReshapePattern

Signed-off-by: Yasushi Negishi <[email protected]>

* Add test cases for CombinedReshapePattern and RemoveIdentityReshapePattern.

Signed-off-by: Yasushi Negishi <[email protected]>

* Update utils/gen_onnx_mlir.py to generate src/Dialect/ONNX/ONNXOps.td.inc correctly.

Signed-off-by: Yasushi Negishi <[email protected]>

* Fix link errors.

Signed-off-by: Yasushi Negishi <[email protected]>

* Fix build errors on Jenkins

Signed-off-by: Yasushi Negishi <[email protected]>

Co-authored-by: Alexandre Eichenberger <[email protected]>
Co-authored-by: NathanielMcVicar <[email protected]>
Co-authored-by: Kevin O'Brien <[email protected]>
Co-authored-by: chentong319 <[email protected]>
Co-authored-by: Tung D. Le <[email protected]>
Co-authored-by: Steven Royer <[email protected]>
brucekimrokcmu added a commit that referenced this pull request Sep 25, 2023
…2481)

This PR adds device="cpu" support for `aten.to_dtypeLayout` op and
corresponding e2e test suit.
(refer:  PR #812)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants