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

Nhat/debug env #219

Closed
wants to merge 10 commits into from
Closed

Nhat/debug env #219

wants to merge 10 commits into from

Conversation

nhat-nguyen
Copy link
Collaborator

No description provided.

zhaoshiz and others added 10 commits December 11, 2024 17:15
Fixing below compilation errors in include/triton-shared/Conversion/TritonArithToLinalg/ConversionPatterns.hpp:

  /home/runner/work/triton-shared/triton-shared/triton_shared/include/triton-shared/Conversion/TritonArithToLinalg/ConversionPatterns.hpp:839:68: error: no member named 'getFile' in 'mlir::triton::AssertOp'
          llvm::formatv("{0}.py:{1}: {2} Assertion `{3}` failed", op.getFile(),
                                                                  ~~ ^
  /home/runner/work/triton-shared/triton-shared/triton_shared/include/triton-shared/Conversion/TritonArithToLinalg/ConversionPatterns.hpp:840:26: error: no member named 'getLine' in 'mlir::triton::AssertOp'
                        op.getLine(), op.getFunc(), op.getMessage());
                        ~~ ^
  /home/runner/work/triton-shared/triton-shared/triton_shared/include/triton-shared/Conversion/TritonArithToLinalg/ConversionPatterns.hpp:840:40: error: no member named 'getFunc' in 'mlir::triton::AssertOp'
                        op.getLine(), op.getFunc(), op.getMessage());
                                      ~~ ^
  3 errors generated.

This fix builds with triton @ab07e5472bcb414a0c8dd7ecab80f84370c4894e,
and llvm @cfd3289a1f9a87e220737a634904a886a82d424a.
Fix compilation errors caused by LLVM commits:
f18c3e4e7335df282c468b6dff3d29be1822a96d [mlir][Transforms] Dialect Conversion: Simplify materialization fn result type (#113031)
8c4bc1e75de27adfbaead34b895b0efbaf17bd02 [mlir][Transforms] Merge 1:1 and 1:N type converters (#113032)

Update Triton to 94684d326723b67b146f23f342623ea058a32098
Remove parts of llvm::formatv string correspond to File, Line and Func
arguments of triton::AssertOp.
Add `sanitize_overflow: bool = True` to class CPUOptions in compiler.py
and `get_benchmarker(self)` to class CPUDriver in driver.py to run the
tests.

XFAILing TritonToLinalg tests since this pass will be retire soon:
test/Conversion/TritonToLinalg/wraparound_side_by_side.mlir
test/Conversion/TritonToLinalg/wraparound_stacked.mlir

XFAILing StructuredToMemref tests due to LLVM commit
889b67c9d30e3024a1317431d66c22599f6c2011 asserts that dynamic shapes
like <2x?> and <?x?> are mismatch:
test/Conversion/StructuredToMemref/wraparound_side_by_side.mlir
test/Conversion/StructuredToMemref/wraparound_stacked.mlir
Update CMakeList.txt for python and pybind11 headers.
Fixed test/Conversion/TritonArithToLinalg/split.mlir.
Working on test/Conversion/StructuredToMemref/get_num_programs.mlir.

Builds with Triton@acc25d91fba850c18c099e7e577962ba56bdd06c and
LLVM@86b69c31642e98f8357df62c09d118ad1da4e16a.
Add rewriteSplatOp() in PtrAnalysis pass. This function creates a
tts.makeptr for the case below:
    %6 = tt.splat %arg0 : !tt.ptr<i32> -> tensor<1x!tt.ptr<i32>>

Previously we rely on rewriteAddPtrOp to create the tts.makeptr:
    %3 = arith.constant 0 : index
    %6 = tt.splat %arg0 : !tt.ptr<i32> -> tensor<1x!tt.ptr<i32>>
    %7 = tt.addptr %6, %3 : tensor<1x!tt.ptr<i32>>, tensor<1xi32>

Creating a constant 0 and adding it to a pointer is optimized away by
Triton.
@nhat-nguyen nhat-nguyen deleted the nhat/debug_env branch January 10, 2025 17:34
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