-
Notifications
You must be signed in to change notification settings - Fork 344
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
[Draft][XLA:GPU] Add sycl runtime #9042
base: main
Are you sure you want to change the base?
Conversation
Hi @penpornk , this is the big SYCL runtime PR for preview and CI test, we will continue to split it into small PRs. Next work:
We still need some JAX work to enable Intel public CI for this PR. Will share CI result to this PR after it's done |
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.
Thank you for the PR! Could you please help make it buildable when SYCL is not configured? (All presubmit CIs are failing. I'm not sure why all their error logs aren't viewable though.)
The Intel Extension for OpenXLA plug-in requires oneAPI Base Toolkit installation for DPC++, oneMKL, and oneTBB. I don't see their headers in this PR. Does this mean we can build this PR with SYCL without installing the oneAPI Base Toolkit?
#include "xla/stream_executor/platform/port.h" | ||
#include "xla/stream_executor/sycl/sycl_gpu_runtime.h" | ||
|
||
#include <level_zero/ze_api.h> |
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.
Does the user need to install Level Zero driver (intel-level-zero-gpu
and level-zero
) to build this file, or is the headers package (level-zero-dev
) enough?
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.
level-zero-dev
is enough for building.
f15897e
to
8b322f8
Compare
Sorry for the late reply. I have rebased the code and now it should work.
oneAPI Base Toolkit is needed for the headers, for example |
Imported from GitHub PR openxla/xla#10244 It is a sub PR of openxla/xla#9042. Then we can build xla with sycl support like: `bazel build --config=sycl xxx` Copybara import of the project: -- e1bc7ac90f3403a477ba14533dea972de6a2c262 by Sheng, Yang <yang.sheng@intel.com>: Add sycl build target Merging this change closes #10244 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10244 from Intel-tensorflow:yang/syclbuild e1bc7ac90f3403a477ba14533dea972de6a2c262 PiperOrigin-RevId: 615176784
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#10247 from Intel-tensorflow:yang/pjrt c2f60c318aebfe4e64bf3becfd40d04949c50b41 PiperOrigin-RevId: 615176920
Imported from GitHub PR #10247 It is a sub PR of #9042. Copybara import of the project: -- c2f60c3 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 COPYBARA_INTEGRATE_REVIEW=#10247 from Intel-tensorflow:yang/pjrt c2f60c3 PiperOrigin-RevId: 617141542
Imported from GitHub PR openxla/xla#10247 It is a sub PR of openxla/xla#9042. Copybara import of the project: -- c2f60c318aebfe4e64bf3becfd40d04949c50b41 by Sheng, Yang <yang.sheng@intel.com>: Add sycl name in se_gpu_pjrt_client Merging this change closes #10247 PiperOrigin-RevId: 617141542
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 Reverts f5ff233 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 631712809
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 631712809
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 631712809
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 634288679
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 634288679
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 634288679
Imported from GitHub PR #11767 This is a sub PR of #9042, it adds a script to build xla with `--config=sycl`. Here is how to use: ```bash workspace=$1 xla_path=$workspace/xla cd $workspace git clone -b yang/ci https://github.com/Intel-tensorflow/xla xla bash $xla_path/build_tools/sycl/build.sh $workspace ``` Copybara import of the project: -- d811bba by Sheng, Yang <yang.sheng@intel.com>: Add SYCL build script -- 0c2500b by Sheng, Yang <yang.sheng@intel.com>: change path Merging this change closes #11767 FUTURE_COPYBARA_INTEGRATE_REVIEW=#11767 from Intel-tensorflow:yang/ci 0c2500b PiperOrigin-RevId: 634661773
Imported from GitHub PR openxla/xla#11767 This is a sub PR of openxla/xla#9042, it adds a script to build xla with `--config=sycl`. Here is how to use: ```bash workspace=$1 xla_path=$workspace/xla cd $workspace git clone -b yang/ci https://github.com/Intel-tensorflow/xla xla bash $xla_path/build_tools/sycl/build.sh $workspace ``` Copybara import of the project: -- d811bba1548f0c983da473a0940b1ea3d8b2c436 by Sheng, Yang <yang.sheng@intel.com>: Add SYCL build script -- 0c2500b703b73bc340ccc9e3817c7ce54cc8d718 by Sheng, Yang <yang.sheng@intel.com>: change path Merging this change closes #11767 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11767 from Intel-tensorflow:yang/ci 0c2500b703b73bc340ccc9e3817c7ce54cc8d718 PiperOrigin-RevId: 634661773
Imported from GitHub PR openxla/xla#11767 This is a sub PR of openxla/xla#9042, it adds a script to build xla with `--config=sycl`. Here is how to use: ```bash workspace=$1 xla_path=$workspace/xla cd $workspace git clone -b yang/ci https://github.com/Intel-tensorflow/xla xla bash $xla_path/build_tools/sycl/build.sh $workspace ``` Copybara import of the project: -- d811bba1548f0c983da473a0940b1ea3d8b2c436 by Sheng, Yang <yang.sheng@intel.com>: Add SYCL build script -- 0c2500b703b73bc340ccc9e3817c7ce54cc8d718 by Sheng, Yang <yang.sheng@intel.com>: change path Merging this change closes #11767 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11767 from Intel-tensorflow:yang/ci 0c2500b703b73bc340ccc9e3817c7ce54cc8d718 PiperOrigin-RevId: 634661773
Imported from GitHub PR #11767 This is a sub PR of #9042, it adds a script to build xla with `--config=sycl`. Here is how to use: ```bash workspace=$1 xla_path=$workspace/xla cd $workspace git clone -b yang/ci https://github.com/Intel-tensorflow/xla xla bash $xla_path/build_tools/sycl/build.sh $workspace ``` Copybara import of the project: -- d811bba by Sheng, Yang <yang.sheng@intel.com>: Add SYCL build script -- 0c2500b by Sheng, Yang <yang.sheng@intel.com>: change path Merging this change closes #11767 COPYBARA_INTEGRATE_REVIEW=#11767 from Intel-tensorflow:yang/ci 0c2500b PiperOrigin-RevId: 634676627
Imported from GitHub PR openxla/xla#11767 This is a sub PR of openxla/xla#9042, it adds a script to build xla with `--config=sycl`. Here is how to use: ```bash workspace=$1 xla_path=$workspace/xla cd $workspace git clone -b yang/ci https://github.com/Intel-tensorflow/xla xla bash $xla_path/build_tools/sycl/build.sh $workspace ``` Copybara import of the project: -- d811bba1548f0c983da473a0940b1ea3d8b2c436 by Sheng, Yang <yang.sheng@intel.com>: Add SYCL build script -- 0c2500b703b73bc340ccc9e3817c7ce54cc8d718 by Sheng, Yang <yang.sheng@intel.com>: change path Merging this change closes #11767 PiperOrigin-RevId: 634676627
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 634288679
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 634288679
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 640626910
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 640626910
Imported from GitHub PR openxla/xla#11425 It is a sub PR of openxla/xla#9042 to add sycl platform Copybara import of the project: -- 7d0c37057c673f784089ce961d24276a496d43bd by Sheng, Yang <yang.sheng@intel.com>: Add sycl platform -- 8d1196831a20f69ba8880d8549007358928f6be1 by Sheng, Yang <yang.sheng@intel.com>: Add comments back Merging this change closes #11425 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#11425 from Intel-tensorflow:yang/sycl-platform 8d1196831a20f69ba8880d8549007358928f6be1 PiperOrigin-RevId: 640626910
This PR aims to add sycl runtime support, we can run basic JAX GPU UTs with it. It includes:
This is a draft PR to show what is needed to run JAX on sycl runtime.