-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add Intel XPU device support to generate and serve #1361
base: main
Are you sure you want to change the base?
Changes from all commits
778efd6
7c4e42b
6ed3cda
6e73400
4735bff
6ef7cd5
4d16351
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,12 @@ echo "Using pip executable: $PIP_EXECUTABLE" | |
# NOTE: If a newly-fetched version of the executorch repo changes the value of | ||
# PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary | ||
# package versions. | ||
PYTORCH_NIGHTLY_VERSION=dev20241002 | ||
if [[ -x "$(command -v xpu-smi)" ]]; | ||
then | ||
PYTORCH_NIGHTLY_VERSION=dev20241001 | ||
else | ||
PYTORCH_NIGHTLY_VERSION=dev20241002 | ||
fi | ||
|
||
# Nightly version for torchvision | ||
VISION_NIGHTLY_VERSION=dev20241002 | ||
|
@@ -85,16 +90,28 @@ then | |
elif [[ -x "$(command -v rocminfo)" ]]; | ||
then | ||
TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/rocm6.2" | ||
elif [[ -x "$(command -v xpu-smi)" ]]; | ||
then | ||
TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/xpu" | ||
else | ||
TORCH_NIGHTLY_URL="https://download.pytorch.org/whl/nightly/cpu" | ||
fi | ||
|
||
# pip packages needed by exir. | ||
REQUIREMENTS_TO_INSTALL=( | ||
torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}" | ||
torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}" | ||
torchtune=="0.4.0.${TUNE_NIGHTLY_VERSION}" | ||
) | ||
if [[ -x "$(command -v xpu-smi)" ]]; | ||
then | ||
REQUIREMENTS_TO_INSTALL=( | ||
torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}" | ||
torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}" | ||
torchtune=="0.3.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Context on the varying tune version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On xpu nightly URL, it does not have nightly version of torchtune, so just install 0.3.1 release for xpu environment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm we should add support for nightly, let me ping some torchtune folk cc: @ebsmothers |
||
) | ||
else | ||
REQUIREMENTS_TO_INSTALL=( | ||
torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}" | ||
torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}" | ||
torchtune=="0.4.0.${TUNE_NIGHTLY_VERSION}" | ||
) | ||
fi | ||
|
||
# Install the requirements. --extra-index-url tells pip to look for package | ||
# versions on the provided URL if they aren't available on the default URL. | ||
|
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.
Why does xpu need an older PYTORCH_NIGHTLY?
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.
when install torch==2.6.0.dev20241002 and torchvision==0.20.0.dev20241002+xpu, it will get error:
ERROR: Cannot install torch==2.6.0.dev20241002 and torchvision==0.20.0.dev20241002+xpu because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested torch==2.6.0.dev20241002
torchvision 0.20.0.dev20241002+xpu depends on torch==2.6.0.dev20241001
So for xpu, I changed the torch nightly version to dev20241001
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.
Let me see if I can get you a fresher version on XPU, the torch/vision discrepancy shouldn't be a normal thing