Skip to content
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

TypeError: GridExecutor._init_args_hst() missing 1 required positional argument: 'kwargs' #18

Closed
zeyuanyin opened this issue Sep 8, 2024 · 4 comments

Comments

@zeyuanyin
Copy link

cell:

@triton.jit
def demo(x_ptr):
    range = tl.arange(0, 8)
    # print works in the interpreter
    print(range)
    x = tl.load(x_ptr + range, range < 5, 0)
    print(x)

triton_viz.trace(demo)[(1, 1, 1)](torch.ones(4, 3))
triton_viz.launch()

output:

TypeError                                 Traceback (most recent call last)
[<ipython-input-5-a54bb9e92c2a>](https://localhost:8080/#) in <cell line: 9>()
      7     print(x)
      8 
----> 9 triton_viz.trace(demo)[(1, 1, 1)](torch.ones(4, 3))
     10 triton_viz.launch()

3 frames
[/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py](https://localhost:8080/#) in <lambda>(*args, **kwargs)
    343         memorizes the grid.
    344         """
--> 345         return lambda *args, **kwargs: self.run(grid=grid, warmup=False, *args, **kwargs)
    346         # return cast(T, functools.partial(cast(Callable, self.run), grid=grid))
    347 

[/usr/local/lib/python3.10/dist-packages/triton_viz/trace.py](https://localhost:8080/#) in run(self, *args, **kwargs)
     14     def run(self, *args, **kwargs):
     15         with patch():
---> 16             return self._fn.run(*args, **kwargs)
     17 
     18 

[/usr/local/lib/python3.10/dist-packages/triton/runtime/interpreter.py](https://localhost:8080/#) in run(*args, **kwargs)
   1106         def run(*args, **kwargs):
   1107             grid = kwargs["grid"]
-> 1108             return GridExecutor(self.fn, self.arg_names, grid)(*args, **kwargs)
   1109 
   1110         self.run = run

[/usr/local/lib/python3.10/dist-packages/triton_viz/interpreter.py](https://localhost:8080/#) in _grid_executor_call(self, *args_dev, **kwargs)
    135 
    136 def _grid_executor_call(self, *args_dev, **kwargs):
--> 137     args_hst = self._init_args_hst(args_dev)
    138     # Removes reserved keywords from kwargs
    139     kwargs = {k: v for k, v in kwargs.items() if k not in RESERVED_KWS}

TypeError: GridExecutor._init_args_hst() missing 1 required positional argument: 'kwargs'

Hi @srush, it seems "grid" kwarg is missing when running triton_viz.trace.

@qsh-zh
Copy link

qsh-zh commented Sep 8, 2024

run into same issue

@srush
Copy link
Owner

srush commented Sep 9, 2024

Thanks I'll take a look. @Jokeren @zeyuanyin did something change here?

@Jokeren
Copy link
Contributor

Jokeren commented Sep 9, 2024

Yes. My student @mark14wu will take care of this issue.

See discussions here Deep-Learning-Profiling-Tools/triton-viz#33

@zeyuanyin
Copy link
Author

Thanks for solving this issue. @srush @Jokeren @mark14wu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants