Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wqshmzh
ktransformers
Commits
f53d5aa9
"tests/vscode:/vscode.git/clone" did not exist on "06fd4277973d9ca14f7cdf364943c28de95e5510"
Unverified
Commit
f53d5aa9
authored
Apr 07, 2025
by
Atream
Committed by
GitHub
Apr 07, 2025
Browse files
Create CMakeLists.txt
parent
6ca743ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
CMakeLists.txt
CMakeLists.txt
+25
-0
No files found.
CMakeLists.txt
0 → 100644
View file @
f53d5aa9
cmake_minimum_required
(
VERSION 3.10
)
find_package
(
PythonInterp REQUIRED
)
execute_process
(
COMMAND
${
PYTHON_EXECUTABLE
}
-c
"
import torch
print(torch.compiled_with_cxx11_abi())
"
OUTPUT_VARIABLE TORCH_CXX11_ABI
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
TORCH_CXX11_ABI MATCHES
"True|False"
)
if
(
TORCH_CXX11_ABI
)
message
(
STATUS
"PyTorch was compiled with CXX11 ABI: ON"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D_GLIBCXX_USE_CXX11_ABI=1"
)
else
()
message
(
STATUS
"PyTorch was compiled with CXX11 ABI: OFF"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D_GLIBCXX_USE_CXX11_ABI=0"
)
endif
()
else
()
message
(
WARNING
"Could not determine if PyTorch was compiled with CXX11 ABI. Defaulting to OFF."
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-D_GLIBCXX_USE_CXX11_ABI=0"
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment