Closed tdeng5 closed 8 months ago
Edit: fixed in #374
Triton currently has a circular import error. It is due to the Triton imports ipex in driver.py. ipex will then import triton_heuristics.py, and in triton_heuristic.py, it will from triton import Config. Thus, there exists a circular import error.
Have left a review comment in this PR#374.
After fixing this, it looks IPEX needs to align the capability
with PyTorch upstream. Previously IPEX pass capability
in python dictionary, current Triton Compiler requires integer type.
There is an assertion here. @Stonepia Could you please take a look?
https://github.com/intel/intel-xpu-backend-for-triton/blob/734343e5b724822351f40acd6aebc4f8e8b4dd42/third_party/intel/backend/compiler.py#L372-L373.
Edit: fixed in #374 Triton currently has a circular import error. It is due to the Triton imports ipex in driver.py. ipex will then import triton_heuristics.py, and in triton_heuristic.py, it will from triton import Config. Thus, there exists a circular import error.
Have left a review comment in this PR#374.
After fixing this, it looks IPEX needs to align the
capability
with PyTorch upstream. Previously IPEX passcapability
in python dictionary, current Triton Compiler requires integer type. There is an assertion here. @Stonepia Could you please take a look?.
After discussion, we temporarily return a hard-coded number int for describing capability to align with upstream. We will refine this later.
With the PRs https://github.com/intel/intel-xpu-backend-for-triton/pull/374 and https://github.com/intel/intel-xpu-backend-for-triton/pull/410 fixing, we can run Inductor E2E model with IPEX + Triton 3.0, there should be no problem with the APIs.
Edit: fixed in https://github.com/intel/intel-xpu-backend-for-triton/pull/374
Triton currently has a circular import error.
It is due to the Triton imports ipex in driver.py. ipex will then import
triton_heuristics.py
, and intriton_heuristic.py
, it willfrom triton import Config
. Thus, there exists a circular import error.IMHO, Triton should not import intel_extension_for_pytorch at such an early stage. The correct import trace is supposed to let ipex import Triton, rather than Triton import ipex.