-
Notifications
You must be signed in to change notification settings - Fork 46
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
Build instructions don't work #335
Comments
Are you building on a PVC machine with oneAPI 2024 installed? |
No, I am using arc 370m. Trying my luck 🤷🏽. The issue is not the gpu (yet). Issue seems to be environment variables. Likely to do with venv. Yes, I am on the branch llvm-target. Lemme retry with venv and report back results to you. |
Hey, it actually compiles with venv! On my arc 370m system!
Lemme try importing triton: $ cd /home/sasank/code/triton-build/intel-xpu-backend-for-triton
$ source .venv/bin/activate
# don't be in triton dir
$ cd ..
# install deps in venv
$ python -m pip install torch==2.1.0a0 torchvision==0.16.0a0 torchaudio==2.1.0a0 intel-extension-for-pytorch==2.1.10+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
(triton) $ python3
>>> import triton
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/__init__.py", line 8, in <module>
from .runtime import (
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/runtime/__init__.py", line 1, in <module>
from .autotuner import (Autotuner, Config, Heuristics, OutOfResources, autotune, heuristics)
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/runtime/autotuner.py", line 7, in <module>
from ..testing import do_bench
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/testing.py", line 7, in <module>
from . import language as tl
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/language/__init__.py", line 6, in <module>
from .standard import (
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/language/standard.py", line 3, in <module>
from ..runtime.jit import jit
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/runtime/jit.py", line 10, in <module>
from ..runtime.driver import driver
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/runtime/driver.py", line 1, in <module>
from ..backends import backends
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/backends/__init__.py", line 50, in <module>
backends = _discover_backends()
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/backends/__init__.py", line 44, in _discover_backends
driver = _load_module(name, os.path.join(root, name, 'driver.py'))
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/backends/__init__.py", line 12, in _load_module
spec.loader.exec_module(module)
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/backends/xpu/driver.py", line 10, in <module>
import intel_extension_for_pytorch as ipex
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/intel_extension_for_pytorch/__init__.py", line 123, in <module>
from . import _inductor
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/intel_extension_for_pytorch/_inductor/__init__.py", line 1, in <module>
from . import xpu
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/intel_extension_for_pytorch/_inductor/xpu/__init__.py", line 4, in <module>
from .codegen.triton import XPUTritonScheduling
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/intel_extension_for_pytorch/_inductor/xpu/codegen/triton.py", line 17, in <module>
from torch._inductor.codegen.triton import (
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/torch/_inductor/codegen/triton.py", line 26, in <module>
from ..triton_heuristics import AutotuneHint
File "/home/sasank/code/triton-build/intel-xpu-backend-for-triton/.venv/lib/python3.10/site-packages/torch/_inductor/triton_heuristics.py", line 44, in <module>
from triton import Config
ImportError: cannot import name 'Config' from partially initialized module 'triton' (most likely due to a circular import) (/home/sasank/code/triton-build/intel-xpu-backend-for-triton/python/triton/__init__.py) Well something simple seems to be off. |
Glad it works for you. I cannot reproduce the problem you see with importing Triton, is it reproducible by you? Can you share the output of your |
Here’s the output of pip list of my env
I will also share the data from 'Editable project location' of triton from above:
|
I can reproduce the problem with importing Triton now. By doing |
From the call stack above, you can see a circular import (triton -> IPEX -> triton). So we need to import IPEX before triton to break it. |
Confirming that importing intel_extension_for_pytorch before triton doesn't throw error. |
@chsasank given comment #335 (comment) can this issue be closed now ? |
Can we write a wiki or something detailing the process? I can volunteer. Sent from my Galaxy
-------- Original message --------From: Ettore Tiotto ***@***.***> Date: 26/01/24 22:16 (GMT+05:30) To: intel/intel-xpu-backend-for-triton ***@***.***> Cc: Sasank Chilamkurthy ***@***.***>, Mention ***@***.***> Subject: Re: [intel/intel-xpu-backend-for-triton] Build instructions don't work (Issue #335)
@chsasank given comment #335 (comment) can this issue be closed now ?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
As promised in #335, here are the instructions for building this fork of triton. Can add a link to this doc in README if maintainers are ok :) --------- Co-authored-by: Pavel Chekin <[email protected]>
I have followed the instructions in the readme and the build fails with the following error. MLIR and others got built successfully.
The text was updated successfully, but these errors were encountered: