Open gurwinderintel opened 1 month ago
@gurwinderintel could you please provide more details on your environment:
Version: GPU Driver: agama-ci-devel-803.44 torch==2.1.0 intel_extension_for_pytorch==2.1.20+xpu oneAPI BaseKit==2024.2.0.559
I would recommending using PyTorch 2.4 w/out IPEX - I suspect the combo of PyTorch/IPEX you have is too old.
@gurwinderintel
You are using old LTS driver, the current is 803.75. Triton is functional on LTS but you won't get any performance. We commend to use latest Rolling.
Triton will work only with:
PyTorch Dependency Bundle not regular oneAPI Basekit. Upstream PyTorch and Triton XPU will start supporting oneAPI Basekit starting from the 2025.0 release as per current plans.
Upstream PyTorch >= 2.4 with or without Triton specific pending PR's applied. Regilar IPEX is not supported as of now, we are in a process of deprecating dependency on special PT/IPEX 2.1 test proxies, we do not recommend to use those.
To build Upstream PyTorch from source run the following script.
./scripts/compile-pytorch-ipex.sh --pytorch --upstream-pytorch --source
Our Tutorials code still have import intel_extension_for_pytorch
line. You can either comment it out or install the dummy no-op ipex using this script:
from os import chdir, makedirs
from tempfile import TemporaryDirectory
from subprocess import run
with TemporaryDirectory() as tmpdir:
pkg = "intel_extension_for_pytorch"
chdir(tmpdir)
makedirs(pkg, exist_ok=True)
files = {
f"{pkg}/__init__.py": "",
"setup.py": (
"from setuptools import setup, find_packages\n"
f"setup(name='{pkg}', version='2', packages=find_packages())"
),
"project.toml": (
"[build-system]\n"
"requires = [\"setuptools\", \"wheel\"]\n"
"build-backend = \"setuptools.build_meta\""
)
}
for file, content in files.items():
with open(file, "w") as f:
f.write(content)
cmds = [
f"pip uninstall -y {pkg}",
"pip install build",
"python -m build .",
f"pip install dist/{pkg}-2-py3-none-any.whl"
]
for cmd in cmds:
run(cmd.split(), check=True)
Error
Ran Sample Code on Intel PVC:
If I use import intel_extension_for_pytorch as ipex then it throw this Error: