find_cmake.py 255 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
import os

import torch

cmake_prefix_path = getattr(
    torch.utils,
    "cmake_prefix_path",
    os.path.join(os.path.dirname(torch.__file__), "share", "cmake"),
)
version = torch.__version__.split("+")[0]
print(";".join([cmake_prefix_path, version]))