[Bugifx] Remove TritonPlaceholder from sys.modules (#17317)
Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import sys
|
|
||||||
import types
|
import types
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
|
|
||||||
@@ -45,9 +44,4 @@ if not HAS_TRITON:
|
|||||||
super().__init__("triton.language")
|
super().__init__("triton.language")
|
||||||
self.constexpr = None
|
self.constexpr = None
|
||||||
self.dtype = None
|
self.dtype = None
|
||||||
|
self.int64 = None
|
||||||
sys.modules['triton'] = TritonPlaceholder()
|
|
||||||
sys.modules['triton.language'] = TritonLanguagePlaceholder()
|
|
||||||
|
|
||||||
if 'triton' in sys.modules:
|
|
||||||
logger.info("Triton module has been replaced with a placeholder.")
|
|
||||||
|
|||||||
Reference in New Issue
Block a user