diff --git a/.gitmodules b/.gitmodules index cbea5d9e..00209831 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "submodules/xformers"] path = submodules/xformers url = https://github.com/facebookresearch/xformers.git +[submodule "submodules/cutlass"] + path = submodules/cutlass + url = https://github.com/NVIDIA/cutlass.git diff --git a/submodules/cutlass b/submodules/cutlass new file mode 160000 index 00000000..bbe579a9 --- /dev/null +++ b/submodules/cutlass @@ -0,0 +1 @@ +Subproject commit bbe579a9e3beb6ea6626d9227ec32d0dae119a49 diff --git a/tritonbench/utils/env_utils.py b/tritonbench/utils/env_utils.py index 2cc65a3e..b3de9507 100644 --- a/tritonbench/utils/env_utils.py +++ b/tritonbench/utils/env_utils.py @@ -24,13 +24,13 @@ def set_env(): - import torch - IS_FBCODE = not hasattr(torch.version, "git_version") # set cutlass dir # by default we use the cutlass version built with fbgemm - if not "TORCHINDUCTOR_CUTLASS_DIR" in os.environ and not IS_FBCODE: - cutlass_dir = REPO_PATH.joinpath("submodules", "FBGEMM", "external", "cutlass") - os.environ["TORCHINDUCTOR_CUTLASS_DIR"] = str(cutlass_dir.absolute()) + import torch + current_cutlass_dir = torch._inductor.config.cuda.cutlass_dir + if not os.path.exists(current_cutlass_dir): + tb_cutlass_dir = REPO_PATH.joinpath("submodules", "cutlass") + torch._inductor.config.cuda.cutlass_dir = str(tb_cutlass_dir) def set_random_seed():