Skip to content

Commit

Permalink
fix broken API
Browse files Browse the repository at this point in the history
  • Loading branch information
msaroufim committed Apr 16, 2024
1 parent 3d9a337 commit eb13ee4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmarks/intmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
import pathlib

import torch
from torchao.quantization.utils import TORCH_VERSION_AFTER_2_4
from torchao.quantization.utils import TORCH_VERSION_AFTER_2_4, TORCH_VERSION_AFTER_2_2


# Check if CUDA is available, if not, exit the script
if not torch.cuda.is_available():
print("CUDA is not available. Exiting the script.")
sys.exit(0)

if not TORCH_VERSION_AFTER_2_4:
print("torch version must be 2.4 or higher")
if not TORCH_VERSION_AFTER_2_2:
print("torch version must be 2.2 or higher")
sys.exit(0)

import torch.nn.functional as F
import torch.utils.benchmark as benchmark
from torchao.kernel.intmm_triton import int_matmul, int_scaled_matmul
from torchao.kernel.intmm import int_matmul, int_scaled_matmul

torch._dynamo.config.cache_size_limit = 128
torch._dynamo.config.accumulated_cache_size_limit = 128
Expand Down

0 comments on commit eb13ee4

Please sign in to comment.