-
Notifications
You must be signed in to change notification settings - Fork 44
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
[XPU][LLVMIR] Generate opencl.kernels
named metadata
#2923
base: main
Are you sure you want to change the base?
Conversation
When converting `tt.func` to `llvm.func`, attach a `triton_gen.opencl_kernels` attribute to be handled during translation to LLVM IR. Then, add an `opencl.kernels` named metadata with `MDNodes` referencing kernel functions in the module. Signed-off-by: Victor Perez <victor.perez@codeplay.com>
Running https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12160033320/job/33911430010 for integration with #2845 and measuring performance impact of both PRs combined. |
I'm looking into it |
IGC compilation breaks only for given sub-group size-local size combination (16, 64). I'll fill a ticket in for that. |
Will hold this PR till IGC gets a fix. |
handleTritonGenOpenCLKernelsAttr(Operation *op, | ||
LLVM::ModuleTranslation &moduleTranslation) { | ||
auto mlirFunc = dyn_cast<LLVM::LLVMFuncOp>(op); | ||
if (!mlirFunc) |
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.
Shouldn't we also make sure the function is a kernel (with isKernel(op)) ?
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.
I'll look into that when I get back to this.
When converting
tt.func
tollvm.func
, attach atriton_gen.opencl_kernels
attribute to be handled during translation to LLVM IR. Then, add anopencl.kernels
named metadata withMDNodes
referencing kernel functions in the module.Closes #2869