Skip to content

Instantly share code, notes, and snippets.

@nilreml
Last active May 20, 2024 11:18
Show Gist options
  • Save nilreml/c88621af7295c0d9af8ae9599da49c15 to your computer and use it in GitHub Desktop.
Save nilreml/c88621af7295c0d9af8ae9599da49c15 to your computer and use it in GitHub Desktop.
# Monkeypatch pytorch to run GEMM kernel autotuning on non-enterprise CUDA GPUs
# until https://github.com/pytorch/pytorch/issues/109489 is resolved:
# Put these 4 lines at the top of the main script, before any imports
# TODO: remove once https://github.com/pytorch/pytorch/issues/109489 is resolved
from torch._inductor import utils
utils._use_template_for_cuda = lambda x, y: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment