Skip to content

Commit

Permalink
Disable thread-local tape for python builds
Browse files Browse the repository at this point in the history
  • Loading branch information
auto-differentiation-dev committed Apr 4, 2024
1 parent f3c3dc1 commit a33a5b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 0 additions & 9 deletions build_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@
from distutils.extension import Extension as _Extension # type: ignore[assignment]


# Convert distutils Windows platform specifiers to CMake -A arguments
PLAT_TO_CMAKE = {
"win32": "Win32",
"win-amd64": "x64",
"win-arm32": "ARM",
"win-arm64": "ARM64",
}


def get_vsvars_environment(architecture="amd64", toolset="14.3"):
"""Returns a dictionary containing the environment variables set up by vsvarsall.bat
architecture - Architecture to pass to vcvarsall.bat. Normally "x86" or "amd64"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

[tool.poetry]
name = "xad"
version = "1.5.1.2"
version = "1.5.1.3"
description = "High-Performance Automatic Differentiation for Python"
authors = ["Auto Differentiation Dev Team <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
if(MSVC)
option(XAD_STATIC_MSVC_RUNTIME "Use static runtime" ON)
endif()
option(XAD_NO_THREADLOCAL "Use thread-local tape" ON)

find_package(Threads REQUIRED)

Expand All @@ -48,6 +49,7 @@ pybind11_add_module(
target_include_directories(_xad PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/xad/src
xad/src)
set_target_properties(_xad PROPERTIES CXX_STANDARD 17)
target_link_libraries(_xad PRIVATE Threads::Threads)
if(MSVC)
target_compile_options(_xad PRIVATE -nologo -utf-8 "/arch:AVX")
target_compile_definitions(
Expand Down

0 comments on commit a33a5b1

Please sign in to comment.