[PYTHON] triton.language
is now a submodule rather than a single file (#260)
This commit is contained in:
@@ -146,7 +146,7 @@ class CodeGenerator(ast.NodeVisitor):
|
||||
values = [values]
|
||||
for name, value in zip(names, values):
|
||||
if not isinstance(value, triton.language.block):
|
||||
value = triton.language._to_ir(value, self.builder)
|
||||
value = triton.language.core._to_ir(value, self.builder)
|
||||
self.set_value(name, value)
|
||||
|
||||
def visit_AugAssign(self, node):
|
||||
@@ -383,7 +383,7 @@ class CodeGenerator(ast.NodeVisitor):
|
||||
if isinstance(fn, JITFunction):
|
||||
return fn(*args, generator=self, **kws)
|
||||
if hasattr(fn, '__self__') and self.is_triton_object(fn.__self__) or \
|
||||
sys.modules[fn.__module__] is triton.language:
|
||||
sys.modules[fn.__module__] is triton.language.core:
|
||||
return fn(*args, _builder=self.builder, **kws)
|
||||
return fn(*args, **kws)
|
||||
|
||||
|
2
python/triton/language/__init__.py
Normal file
2
python/triton/language/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import core
|
||||
from .core import *
|
@@ -25,7 +25,7 @@ def _patch(fn):
|
||||
if x.type.is_void():
|
||||
return None
|
||||
return block(x)
|
||||
return tl
|
||||
return x
|
||||
|
||||
def wrapper(*args, **kwargs):
|
||||
builder = args[-1]
|
Reference in New Issue
Block a user