Skip to content

Implement SYCL code cache #1

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

Merged

Conversation

sommerlukas
Copy link
Collaborator

Implement a SYCLCodeCache similar to the CUDACodeCache for compilation of CUTLASS code for integration of the CUTLASS SYCL backend into Pytorch TorchInductor.

Also changes the third-party submodule for CUTLASS to use Codeplay's fork with the SYCL backend.

@sommerlukas sommerlukas marked this pull request as ready for review March 18, 2025 16:29
@sommerlukas
Copy link
Collaborator Author

The current PR only moves the cutlass_dir configuration variable from the cuda sub-config into the common config.

Here, there is a number of additional CUTLASS-related options. If they're interesting for our CUTLASS code generation, we could either duplicate them or also move them to the common config.

@OuadiElfarouki
Copy link

The current PR only moves the cutlass_dir configuration variable from the cuda sub-config into the common config.

Here, there is a number of additional CUTLASS-related options. If they're interesting for our CUTLASS code generation, we could either duplicate them or also move them to the common config.

Yes thanks @sommerlukas, indeed a lot can be factorized outside a sycl or cuda scope and I'm seeing this at multiple levels, this would be co-designed alongside the rest of the codegen & template/kernel classes, namely the CUTLASSArgs class for instance. All seems good otherwise thanks.

@sommerlukas
Copy link
Collaborator Author

The current PR only moves the cutlass_dir configuration variable from the cuda sub-config into the common config.
Here, there is a number of additional CUTLASS-related options. If they're interesting for our CUTLASS code generation, we could either duplicate them or also move them to the common config.

Yes thanks @sommerlukas, indeed a lot can be factorized outside a sycl or cuda scope and I'm seeing this at multiple levels, this would be co-designed alongside the rest of the codegen & template/kernel classes, namely the CUTLASSArgs class for instance. All seems good otherwise thanks.

Do you want this to be done or later on? My thinking so far was that we would extract the options once we use them for SYCL code generation in future PRs.

@OuadiElfarouki
Copy link

The current PR only moves the cutlass_dir configuration variable from the cuda sub-config into the common config.
Here, there is a number of additional CUTLASS-related options. If they're interesting for our CUTLASS code generation, we could either duplicate them or also move them to the common config.

Yes thanks @sommerlukas, indeed a lot can be factorized outside a sycl or cuda scope and I'm seeing this at multiple levels, this would be co-designed alongside the rest of the codegen & template/kernel classes, namely the CUTLASSArgs class for instance. All seems good otherwise thanks.

Do you want this to be done or later on? My thinking so far was that we would extract the options once we use them for SYCL code generation in future PRs.

Agree I guess it's better if we keep it for the next PRs so it makes more sense with the upcoming changes.

Copy link

@OuadiElfarouki OuadiElfarouki left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks Lukas for the 1st PR!

@sommerlukas sommerlukas changed the base branch from main to sycl-develop March 20, 2025 12:35
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
@sommerlukas
Copy link
Collaborator Author

Rebased this branch, example still working correctly. Merging now.

@sommerlukas sommerlukas merged commit 730119f into codeplaysoftware:sycl-develop Mar 20, 2025
47 checks passed
@sommerlukas sommerlukas deleted the sycl-code-cache branch March 20, 2025 18:17
sommerlukas added a commit that referenced this pull request Apr 25, 2025
Implement a `SYCLCodeCache` similar to the `CUDACodeCache` for compilation of CUTLASS code for integration of the CUTLASS SYCL backend into Pytorch TorchInductor.

Also changes the third-party submodule for CUTLASS to use Codeplay's fork with the SYCL backend.

---------

Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com>
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.

3 participants