8000 [RFC][API-Unstable] Support 3rd party SYCL kernels with CPP Extension API · Issue #153265 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[RFC][API-Unstable] Support 3rd party SYCL kernels with CPP Extension API #153265

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

Open
5 of 11 tasks
dvrogozh opened this issue May 9, 2025 · 0 comments
Open
5 of 11 tasks
Labels
module: cpp-extensions Related to torch.utils.cpp_extension triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@dvrogozh
Copy link
Contributor
dvrogozh commented May 9, 2025

Background

This RFC is submitted to formally describe and track enabling of SYCL support in CPP Ectension API. The initial enabling of this feature was done in response to the #132944. This RFC tries to follow a guideline process suggested in #152134 for Pytorch 2.8.

Motivation

Pytorch defines a range of standard operators to support variaty of deep learning models. However, with the rapid development of the technology new operators and optimization techniques emerge. Their adoption requires implementations to mature before being accepted in a standard pytorch distribution. To both equip developers with the way to implement new operators capable to work within Pytorch ecosystem and mitigate a dalay to finalize the implementation and get it accepted in a Pytorch code base, Pytorch provides CPP Extension API. At the moment Pytorch defines that API to work with C++, CUDA and Metal sources.

This RFC suggests to extend Pytorch CPP Extension API to allow building new operators for Intel GPU platforms by supporting SYCL standard and compilers. SYCL is an open standard developed by the Khronos Group that allows developers to program heterogeneous architectures in standard C++. Intel GPU software stack supports this standard and provides DPC++ compiler to build SYCL code.

Plan

Here is a check list of items to complete to add SYCL support to Pytorch CPP Extension API for Intel GPUs:

  • Windows:
    • Add SYCL support to torch.utils.cpp_extension.load() API on Windows
    • Add SYCL support to torch.utils.cpp_extension.load_inline() API on Windows
    • Support new class torch.utils.cpp_extension.SyclExtension API on Windows
  • Add CI tests for SYCL support in CPP Extensions
  • Add CD tests for SYCL support in CPP Extensions (tests within production environment)
  • Enable Huggingface Quanto with SYCL kernels (and Pytorch CPP Extension API)
  • Identify and enable 2-3 other 3d party projects with SYCL kernels (and Pytorch CPP Extension API)
  • Clarify, document and test SYCL support story in relevance to SYCL RT and compiler versions

Relevant PRs

Here is a list of relevant PRs improving SYCL support in Pytorch CPP Extension API:

Relevant issues

CC: @EikanWang @guangyey

cc @malfet @zou3519

@colesbury colesbury added module: cpp-extensions Related to torch.utils.cpp_extension triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cpp-extensions Related to torch.utils.cpp_extension triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

2 participants
0