Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed Sep 6, 2024
1 parent 72f6f4b commit 4b8f9d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion benchmarks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

import torch

ipex_cmake_prefix_path = ""
if os.getenv("USE_IPEX", "1") == "1":
import intel_extension_for_pytorch
ipex_cmake_prefix_path = f";{intel_extension_for_pytorch.cmake_prefix_path}"


class CMakeBuild():

Expand Down Expand Up @@ -42,7 +47,7 @@ def build_extension(self):
"Ninja", # Ninja is much faster than make
"-DCMAKE_MAKE_PROGRAM=" +
ninja_dir, # Pass explicit path to ninja otherwise cmake may cache a temporary path
f"-DCMAKE_PREFIX_PATH={torch.utils.cmake_prefix_path}",
f"-DCMAKE_PREFIX_PATH={torch.utils.cmake_prefix_path}{ipex_cmake_prefix_path}",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=" + self.extdir,
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + self.extdir,
Expand Down

0 comments on commit 4b8f9d2

Please sign in to comment.