-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Proton][Dialect] Add Proton Device Memory Buffer Init and Allocate Pass #5606
base: proton-dev
Are you sure you want to change the base?
Conversation
708cb2c
to
73d584d
Compare
third_party/nvidia/lib/TritonNVIDIAGPUToLLVM/TritonGPUToLLVM.cpp
Outdated
Show resolved
Hide resolved
third_party/proton/dialect/include/Dialect/Proton/IR/ProtonOps.td
Outdated
Show resolved
Hide resolved
third_party/proton/dialect/include/Dialect/Proton/IR/ProtonOps.td
Outdated
Show resolved
Hide resolved
@@ -10,6 +10,11 @@ void populateRecordOpToLLVMPattern(LLVMTypeConverter &typeConverter, | |||
RewritePatternSet &patterns, | |||
const TargetInfoBase &targetInfo, | |||
PatternBenefit benefit); | |||
void populateInitDeviceBufferOpToLLVMPattern(LLVMTypeConverter &typeConverter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After we have our own llvm lowering conversion pass, let's this move to proton/dialect/lib/...
third_party/proton/dialect/lib/TritonProtonToLLVM/InitDeviceBufferOpToLLVM.cpp
Outdated
Show resolved
Hide resolved
|
||
|
||
@triton.jit | ||
def softmax_kernel(output_ptr, input_ptr, input_row_stride, output_row_stride, n_rows, n_cols, BLOCK_SIZE: tl.constexpr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the end-to-end testing, you could manually construct a TTGIR with the buffer_alloc_op and read write to it and finally write it back to gmem to check its value in python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I think we'll want to go through in another PR and add all the end to end testing at once to make sure we have the code coverage we want.
1c9d9ca
to
7be389b
Compare
Add the init and allocation of the Proton dialect device buffer that can be used in place of the shared memory buffer. The device buffer is just a module local, zero initialized, stack buffer in address space(1).