Skip to content

Conversation

guangyey
Copy link
Collaborator

@guangyey guangyey commented Aug 7, 2024

Copy link

pytorch-bot bot commented Aug 7, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/132847

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 88f473d with merge base c184ac0 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Aug 7, 2024
guangyey added a commit that referenced this pull request Aug 7, 2024
ghstack-source-id: e790c74
Pull Request resolved: #132847
@guangyey guangyey added the intel This tag is for PR from Intel label Aug 7, 2024
[ghstack-poisoned]
@guangyey guangyey added the release notes: xpu release notes category label Aug 8, 2024
@EikanWang
Copy link
Collaborator

Overall, it looks good to me. But I think the PR description is not the motivation. We need to describe what the changes serve for. If it is an issue to support extension mechanism, I'd prefer to submit an issue and link to the issue number.

@guangyey
Copy link
Collaborator Author

guangyey commented Aug 8, 2024

cc @min-jean-cho

@guangyey guangyey requested a review from min-jean-cho August 8, 2024 03:29
@guangyey guangyey added ciflow/xpu Run XPU CI tasks ciflow/trunk Trigger trunk jobs on your pull request labels Aug 8, 2024
@guangyey
Copy link
Collaborator Author

guangyey commented Aug 8, 2024

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@guangyey
Copy link
Collaborator Author

@pytorchbot cherry-pick --onto release/2.4 -c critical --fixes #132971

pytorchbot pushed a commit that referenced this pull request Aug 16, 2024
# Motivation

fix #132971

Pull Request resolved: #132847
Approved by: https://github.com/EikanWang

(cherry picked from commit 9c5e0d4)
@pytorchbot
Copy link
Collaborator

Cherry picking #132847

The cherry pick PR is at #133649 and it is linked with issue #132971. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

dvrogozh added a commit to dvrogozh/optimum-quanto that referenced this pull request Aug 16, 2024
This commit implements xpu extension with unpack kernels written
in sycl. Pytorch XPU backend provides hw acceleration on Intel
GPUs. At the moment Meteor Lake (MTL) and Data Center Max (PVC)
are supported. Provided sycl kernel was converted from existing
cuda kernel.

$ python bench/kernels/benchmark.py --it 1000
unpack_2bit[xpu]: python = 0.177 ms, ext = 0.033 ms, ratio = 5.4x
unpack_4bit[xpu]: python = 0.085 ms, ext = 0.026 ms, ratio = 3.3x

note: without extension ratio is 0.8x.

At the moment there are few not implemented features for xpu
backend which affect implementation. These are:
* pytorch/pytorch#127929
  * Some memory ops not supported by xpu backend
  * WA applied: calling these ops is commented out
* pytorch/pytorch#131840
  * elapsed_time is not supported by XPUEvent
  * WA applied: calling these ops is commented out (CPU e2e time
    is measured)
* pytorch/pytorch#132947
  * Some aten ops are not implemented with xpu backend falling back to cpu
  * WA required: set PYTORCH_ENABLE_XPU_FALLBACK=1 on cmdline

Requires: pytorch/pytorch#132847
Requires: pytorch/pytorch#132945
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
atalman pushed a commit that referenced this pull request Aug 21, 2024
Add xpu_cmake_macros.h to xpu build (#132847)

# Motivation

fix #132971

Pull Request resolved: #132847
Approved by: https://github.com/EikanWang

(cherry picked from commit 9c5e0d4)

Co-authored-by: Yu, Guangye <guangye.yu@intel.com>
@github-actions github-actions bot deleted the gh/guangyey/60/head branch September 17, 2024 01:54
dvrogozh added a commit to dvrogozh/pytorch that referenced this pull request Sep 24, 2024
Fixes: pytorch#132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: pytorch#132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
dvrogozh added a commit to dvrogozh/pytorch that referenced this pull request Jan 10, 2025
Fixes: pytorch#132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: pytorch#132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
pytorch-bot bot pushed a commit that referenced this pull request Jan 17, 2025
Fixes: #132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: #132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
pytorch-bot bot pushed a commit that referenced this pull request Jan 24, 2025
Fixes: #132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: #132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
pytorch-bot bot pushed a commit that referenced this pull request Jan 28, 2025
Fixes: #132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: #132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2025
Fixes: #132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: #132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
pytorch-bot bot pushed a commit that referenced this pull request Feb 15, 2025
Fixes: #132944

This patch adds support for sycl kernels build via
torch.utils.cpp_extension.load API. Files having .sycl
extension are considered to have sycl kernels and are
compiled with icpx (dpc++ sycl compiler from Intel).
Files with other extensions, .cpp, .cu, are handled as
before. API supports building sycl along with other
file types into single extension.

By default SYCL kernels are compiled for all Intel GPU
devices for which pytorch native aten SYCL kernels are
compiled. At the moment "pvc,xe-lpg". This behavior can
be overriden by setting TORCH_XPU_ARCH_LIST environment
variables to the comma separated list of desired devices
to compile for.

Requires: #132847
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks intel This tag is for PR from Intel Merged open source release notes: xpu release notes category topic: not user facing topic category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants