perf: add fast-math and vectorization nvcc/cxx build flags
- centralize CXX_FLAGS/NVCC_FLAGS in csrc/build.py as single source - add --use_fast_math, --ptxas-options=-O3,-v, --extra-device-vectorization - add -march=native -funroll-loops host flags - setup.py reads shared cxx_flags/nvcc_flags from registry - sync pure-C test build commands with new flags
This commit is contained in:
@@ -41,7 +41,10 @@ if _should_build():
|
||||
CUDAExtension(
|
||||
f"astrai.extension.{name}",
|
||||
info["sources"],
|
||||
extra_compile_args={"cxx": ["-O3"], "nvcc": info["nvcc_flags"]},
|
||||
extra_compile_args={
|
||||
"cxx": info["cxx_flags"],
|
||||
"nvcc": info["nvcc_flags"],
|
||||
},
|
||||
extra_link_args=[f"-Wl,-rpath,{_torch_lib}"],
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user