Skip to content

Commit

Permalink
Do not compile Python wheels with -march=native (#538)
Browse files Browse the repository at this point in the history
This will give a slight performance hit, but ensure that our wheels are
able to run on older CPUs. If a user needs the increased performance
that comes with `-march=native`, we ask them to compile the package from
source.
  • Loading branch information
janden authored Aug 27, 2024
1 parent f2d878a commit 897b226
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion python/cufinufft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ build-dir = "build/{wheel_tag}"
# Tell skbuild to look for the CMakeLists.txt file two directories up.
cmake.source-dir = "../../"
cmake.targets = ["cufinufft"]
cmake.define = {"FINUFFT_BUILD_PYTHON" = "ON", "FINUFFT_USE_CUDA" = "ON", "FINUFFT_USE_CPU" = "OFF"}
cmake.define.FINUFFT_BUILD_PYTHON = "ON"
cmake.define.FINUFFT_USE_CUDA = "ON"
cmake.define.FINUFFT_USE_CPU = "OFF"
cmake.define.FINUFFT_ARCH_FLAGS = "" # Disable -march=native (default)

wheel.packages = ["cufinufft"]

Expand Down
3 changes: 2 additions & 1 deletion python/finufft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ build-dir = "build/{wheel_tag}"
# Tell skbuild to look for the CMakeLists.txt file two directories up.
cmake.source-dir = "../../"
cmake.targets = ["finufft"]
cmake.define = {"FINUFFT_BUILD_PYTHON" = "ON"}
cmake.define.FINUFFT_BUILD_PYTHON = "ON"
cmake.define.FINUFFT_ARCH_FLAGS = "" # Disable -march=native (default)

wheel.packages = ["finufft"]

Expand Down

0 comments on commit 897b226

Please sign in to comment.