You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tensor.max(axis = 1) doesn't work and tl.max(tensor, axis = 1) works well without TRITON_INTERPRET=1
Actually, It's not a big deal...
key code:
new_max_val = input_val.max(axis = 1) # it doesn't work
# new_max_val = tl.max(input_val, axis = 1) # it works well
error information:
RuntimeError: Cannot call @triton.jit'd outside of the scope of a kernel
The above exception was the direct cause of the following exception:
CompilationError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/triton/compiler/compiler.py](https://localhost:8080/#) in make_ir(self, options, codegen_fns, context)
111
112 def make_ir(self, options, codegen_fns, context):
--> 113 return ast_to_ttir(self.fn, self, context=context, options=options, codegen_fns=codegen_fns)
114
115 def parse_options(self):
CompilationError: at 23:26:
target = tl.load(target_ptr + offsets_rows, mask = offsets_rows < M, other = 0.0)
max_val = tl.full(target.shape, -float("inf"), dtype = tl.float32)
sumexp = tl.zeros_like(max_val)
allcurx = tl.zeros_like(max_val)
for index in tl.range(0, N, BLOCK_SIZE_N):
offsets_input = offsets_rows[:, None] * N + (offsets_cols + index)[None, :]
mask_input = (offsets_rows[:, None] < M) & ((offsets_cols + index)[None, :] < N)
input_val = tl.load(input_ptr + offsets_input, mask=mask_input, other = -float("inf"))
if index == 0:
new_max_val = input_val.max(axis = 1) # it doesn't work
wa008
changed the title
max(tensor, axis = 0) doesn't work when TRITON_INTERPRET=1
max(tensor, axis = 0) doesn't work without TRITON_INTERPRET=1
Jan 3, 2025
wa008
changed the title
max(tensor, axis = 0) doesn't work without TRITON_INTERPRET=1
max(tensor, axis = 1) doesn't work without TRITON_INTERPRET=1
Jan 3, 2025
Describe the bug
tensor.max(axis = 1)
doesn't work andtl.max(tensor, axis = 1)
works well without TRITON_INTERPRET=1Actually, It's not a big deal...
key code:
error information:
full code: https://drive.google.com/file/d/1UBXqpBhELn8amEOU8h5zj1i6WvihZKJX/view?usp=drive_link
Environment details
Triton: 3.1.0
Environment: colab
The text was updated successfully, but these errors were encountered: