question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[inductor] KeyError: 'BLOCK_K' when Enabling Triton BMM

See original GitHub issue

When I set torchinductor.config.triton.use_bmm = True, I get the following exception:

  File "/opt/conda/lib/python3.7/site-packages/torchinductor/triton_ops/batched_matmul.py", line 274, in bmm_out
    _kernel[grid](a, b, c, M, N, K, K, 1, N, 1, N, 1, GROUP_M=8, ACC_TYPE=ACC_TYPE)
  File "/opt/conda/lib/python3.7/site-packages/triton/runtime/jit.py", line 106, in launcher
    return self.run(*args, grid=grid, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/triton/runtime/autotuner.py", line 199, in run
    kwargs[v] = heur({**dict(zip(self.arg_names, args)), **kwargs})
  File "/opt/conda/lib/python3.7/site-packages/torchinductor/triton_ops/batched_matmul.py", line 15, in <lambda>
    "EVEN_K": lambda args: args["K"] % (args["BLOCK_K"] * args["SPLIT_K"]) == 0,
KeyError: 'BLOCK_K'

You can reproduce by running benchmarks/microbenchmarks/inductor_bmm.py with the latest version of triton.

I’m really not sure what the canonical triton version is at this point, but I’m reporting it here regardless.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
desertfirecommented, Oct 11, 2022

We need to add tests for this (and other similar ops).

0reactions
netw0rkf10wcommented, Dec 13, 2022

@jansel Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Enabling modding for pc, Y793h dell, Podkarpacka troja cennik, Pmpr concurso 2013 noticias ... Ijaminecraft one command block tnt, Hopeanuoli ja weed pelit, ......
Read more >
the of and to a in for is on s that by this with i you it not
... host variety teachers isbn martin manual block subjects agents increased ... himself component enable exercise bug santa mid guarantee leader diamond ...
Read more >
Click here to download - Computer Science
... host variety teachers isbn martin manual block subjects agents increased ... chemical doctor task reduce brought himself nor component enable exercise ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found