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

[NFI]: Remove PTX asm format and cleanup #975

Merged
merged 24 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
91d84c3
[Conversion] convert triton ops with block ptr to llvm
Dewei-Wang-sh Mar 25, 2024
e3cbf28
fix rebase
Dewei-Wang-sh Apr 17, 2024
48b85c8
address review comments
Dewei-Wang-sh Apr 18, 2024
f40bbcc
add lit test
Dewei-Wang-sh Apr 19, 2024
e382d9d
Merge remote-tracking branch 'origin/llvm-target' into convert-to-llvm
etiotto Apr 23, 2024
d8adced
Remove unnecessary code
etiotto Apr 23, 2024
344d0c5
Removeunnecessary ssa variable in lit test
etiotto Apr 23, 2024
a70b13f
Simplify code in new transformations
etiotto Apr 23, 2024
0d28d24
Create TritonIntelGPUToLLVMTypeConverter
etiotto Apr 23, 2024
8b9bc21
[NFC]: Fix precommit
etiotto Apr 23, 2024
eec9dc5
Merge branch 'llvm-target' into convert-to-llvm
etiotto Apr 23, 2024
7a9cf47
Merge remote-tracking branch 'origin/llvm-target' into convert-to-llvm
etiotto Apr 24, 2024
8bc9c01
Merge remote-tracking branch 'origin/llvm-target' into convert-to-llvm
etiotto Apr 24, 2024
683ec3e
Final code cleanup
etiotto Apr 24, 2024
6604da5
Fix precommit
etiotto Apr 24, 2024
33677af
Merge remote-tracking branch 'origin/llvm-target' into convert-to-llvm
etiotto Apr 24, 2024
70a2d7b
Address code review comments
etiotto Apr 24, 2024
8509d8a
Address code review comments
etiotto Apr 24, 2024
be9c898
Address code review comments
etiotto Apr 24, 2024
cc10968
Fix precommit
etiotto Apr 24, 2024
1bd6587
Update third_party/intel/lib/TritonIntelGPUToLLVM/TritonOpsToLLVM.cpp
Dewei-Wang-sh Apr 25, 2024
2f79c2a
Merge branch 'llvm-target' into convert-to-llvm
Dewei-Wang-sh Apr 25, 2024
e3f2e49
Cleanup
etiotto Apr 25, 2024
4bc2de2
Merge remote-tracking branch 'origin/llvm-target' into etiotto.cleanup.2
etiotto Apr 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions third_party/intel/include/TritonIntelGPUToLLVM/AsmFormat.h

This file was deleted.

341 changes: 0 additions & 341 deletions third_party/intel/include/TritonIntelGPUToLLVM/PTXAsmFormat.h

This file was deleted.

15 changes: 11 additions & 4 deletions third_party/intel/lib/TritonIntelGPUToLLVM/TritonOpsToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,17 @@ class LoadStorePrefetchOpConversion
Location loc = op.getLoc();
Value bytes =
i32_val(tensorType.getElementType().getIntOrFloatBitWidth() / 8);
Value one = i32_val(1);
Value surfaceW = sub(mul(trunc(i32_ty, ptrOp.getShape()[1]), bytes), one);
Value surfaceH = sub(trunc(i32_ty, ptrOp.getShape()[0]), one);
Value surfaceP = sub(mul(trunc(i32_ty, ptrOp.getStrides()[0]), bytes), one);

auto calculateSurface = [&](Value shape, bool multiplyBytes) {
Value truncatedShape = trunc(i32_ty, shape);
if (multiplyBytes)
truncatedShape = mul(truncatedShape, bytes);
return sub(truncatedShape, i32_val(1));
};

Value surfaceW = calculateSurface(ptrOp.getShape()[1], true);
Value surfaceH = calculateSurface(ptrOp.getShape()[0], false);
Value surfaceP = calculateSurface(ptrOp.getStrides()[0], true);
rewriter.restoreInsertionPoint(insertPoint);

Value tensorPtr = adaptor.getPtr();
Expand Down