aether-dsc 0.7.2__tar.gz → 0.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/CMakeLists.txt +23 -5
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/PKG-INFO +4 -2
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/README.md +1 -1
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cuda/DriverRuntime.inl +10 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/HostVectorMath.h +5 -4
- aether_dsc-0.7.3/aether_dsc/_payload/0f27028f2c1b4ff1e23e90a4a69c665549eb7811c737b6ff74ba55b2dfb44767.bin +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/c_core.py +0 -5
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/payload_headers.txt +2 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/pyproject.toml +3 -2
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/conftest.py +1 -1
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_aether_dsc.py +13 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_arrays.py +6 -1
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_openmp.py +33 -0
- aether_dsc-0.7.2/aether_dsc/_payload/5dc495598ffcb1b6760e0e0b34d90b0dfbd8fac172880d9cc001d9d45e5076e6.bin +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/LICENSE +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/NOTICE +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_build_backend.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketArcTrig.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketExpLog.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketExpLogTables.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketHyperbolic.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketMathCore.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketMisc.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketRounding.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketSinCos.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/chunk/Chunk.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/chunk/Copy.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/chunk/Fill.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/chunk/StreamOrdered.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/device/Device.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/dtype/DType.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/dtype/WorkingType.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/dtype/dlpack.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/err/Error.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/expr/Expression.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/expr/Reduce.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/fft/Fft.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/fft/pocketfft_hdronly.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/index/BundleIndex.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/index/Offset.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/index/SampleIndex.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/interop/DLPack.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/interop/DLPackLegacy.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/layout/Extents.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/layout/Layout.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/layout/detail/Carray.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/macros.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/BandedFwd.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/BoundedTrig.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/HostVectorMathRoute.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/MathDispatch.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/MathDispatchUndef.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/explog.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/hyperbolic.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/invtrig.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/math.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/root.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/round.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/special.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/trig.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/residency/PeerAccess.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/residency/Transport.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/typedefs.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/view/MakeRuntimeView.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/view/RuntimeView.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/view/View.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether/__init__.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether/_dtype.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether/fft.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/__init__.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/_core.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/_openmp.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/_rtc_check.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/_seal_impl.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/payload_headers_host.txt +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/aether_dsc/seal.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/aether_core.cpp +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/cufft_plan.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/driver_runtime.cpp +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/plugin.cpp +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/plugin.map +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/src/seam.h +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_c_core.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_fft.py +0 -0
- {aether_dsc-0.7.2 → aether_dsc-0.7.3}/tests/test_ft_payload.py +0 -0
|
@@ -88,6 +88,22 @@ if(UNIX)
|
|
|
88
88
|
else()
|
|
89
89
|
set_target_properties(_core PROPERTIES INSTALL_RPATH "$ORIGIN/_omp")
|
|
90
90
|
endif()
|
|
91
|
+
# The runtime must be the one this compiler's code calls: libgomp for GCC, LLVM's libomp for Clang. Shipping the other one
|
|
92
|
+
# loads fine and then fails or runs on a second runtime. In a conda environment `libgomp.so.1` can be a symlink to LLVM's
|
|
93
|
+
# libomp, so the check is on the resolved file, not on the name a linker was given.
|
|
94
|
+
get_filename_component(_omp_file "${_omp_real}" NAME)
|
|
95
|
+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
96
|
+
set(_omp_want "libgomp")
|
|
97
|
+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
98
|
+
set(_omp_want "lib(omp|iomp)")
|
|
99
|
+
else()
|
|
100
|
+
set(_omp_want "")
|
|
101
|
+
endif()
|
|
102
|
+
if(_omp_want AND NOT _omp_file MATCHES "^${_omp_want}")
|
|
103
|
+
message(FATAL_ERROR "the OpenMP runtime ${_omp_real} does not match the ${CMAKE_CXX_COMPILER_ID} compiler ${CMAKE_CXX_COMPILER} "
|
|
104
|
+
"(wanted ${_omp_want}*): a libgomp.so.1 that links to LLVM's libomp, as in a conda environment, is the usual cause. "
|
|
105
|
+
"Build with the compiler's own runtime visible (a toolchain outside the conda prefix, or OpenMP_CXX_LIBRARIES set).")
|
|
106
|
+
endif()
|
|
91
107
|
# Refuse by name anything that is not a binary (a text linker script copied here fails at import: "invalid ELF header").
|
|
92
108
|
file(READ "${_omp_real}" _omp_magic LIMIT 4 HEX)
|
|
93
109
|
if(NOT (_omp_magic STREQUAL "7f454c46" OR _omp_magic STREQUAL "cffaedfe" OR _omp_magic STREQUAL "cafebabe"))
|
|
@@ -100,6 +116,9 @@ if(UNIX)
|
|
|
100
116
|
message(FATAL_ERROR "the OpenMP runtime ${_omp_real} has no SONAME (readelf -d found none)")
|
|
101
117
|
endif()
|
|
102
118
|
set(_omp_name "${CMAKE_MATCH_1}")
|
|
119
|
+
if(_omp_want AND NOT _omp_name MATCHES "^${_omp_want}")
|
|
120
|
+
message(FATAL_ERROR "the OpenMP runtime ${_omp_real} has SONAME ${_omp_name}, not the ${CMAKE_CXX_COMPILER_ID} compiler's (wanted ${_omp_want}*)")
|
|
121
|
+
endif()
|
|
103
122
|
endif()
|
|
104
123
|
message(STATUS "OpenMP runtime shipped as aether/_omp/${_omp_name}: ${_omp_real}")
|
|
105
124
|
install(FILES "${_omp_real}" DESTINATION aether/_omp RENAME ${_omp_name})
|
|
@@ -118,10 +137,9 @@ if(UNIX)
|
|
|
118
137
|
if(NOT _cores)
|
|
119
138
|
message(FATAL_ERROR "no aether/_core*.so under ${_dest}: cannot point it at the shipped OpenMP runtime")
|
|
120
139
|
endif()
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
execute_process(COMMAND codesign --remove-signature "${_dest}/_omp/libomp.dylib" COMMAND_ERROR_IS_FATAL ANY)
|
|
140
|
+
# install_name_tool invalidates the signatures (it warns) and needs them in place: a stripped libomp leaves a
|
|
141
|
+
# __LINKEDIT newer Xcode refuses to edit, and `_core` must keep its signature space. Both are re-signed (ad hoc)
|
|
142
|
+
# and verified below: Apple silicon kills a process that maps an invalid signature.
|
|
125
143
|
execute_process(COMMAND install_name_tool -id @rpath/libomp.dylib "${_dest}/_omp/libomp.dylib" COMMAND_ERROR_IS_FATAL ANY)
|
|
126
144
|
# Rewrite from what `_core` actually records (the linker wrote the runtime's own install name: an absolute Homebrew
|
|
127
145
|
# path), then refuse a build that still has an OpenMP reference outside @rpath.
|
|
@@ -163,7 +181,7 @@ endif()
|
|
|
163
181
|
# (the CUDA runtime functions aether's headers call, defined over the driver API), and nvcc links them. It needs
|
|
164
182
|
# libcuda.so.1 at run time and no CUDA runtime library. No CMake CUDA language: `_core` stays CUDA-free.
|
|
165
183
|
function(_aether_plugin)
|
|
166
|
-
set(_hints "$ENV{AETHER_CUDA_ROOT}")
|
|
184
|
+
set(_hints "$ENV{AETHER_CUDA_ROOT}" "$ENV{CUDA_PATH}") # an explicit root first, then the toolkit the environment names
|
|
167
185
|
file(GLOB _cands "/usr/local/cuda-12.*" "/usr/local/cuda")
|
|
168
186
|
list(SORT _cands COMPARE NATURAL ORDER DESCENDING)
|
|
169
187
|
find_program(_aether_nvcc nvcc HINTS ${_hints} ${_cands} PATH_SUFFIXES bin)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aether-dsc
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: aether-dsc: the sealed AETHER header payload (aether_dsc) and CPU/GPU arrays for Python (aether)
|
|
5
5
|
Author: Alessandro Masat
|
|
6
6
|
License: Apache-2.0
|
|
@@ -12,6 +12,8 @@ Project-URL: Repository, https://github.com/amasat01/aether
|
|
|
12
12
|
Requires-Python: >=3.9
|
|
13
13
|
Provides-Extra: test
|
|
14
14
|
Requires-Dist: pytest; extra == "test"
|
|
15
|
+
Requires-Dist: numpy; extra == "test"
|
|
16
|
+
Requires-Dist: raptor-core<0.8,>=0.7.3; extra == "test"
|
|
15
17
|
Provides-Extra: cufft12
|
|
16
18
|
Requires-Dist: nvidia-cufft-cu12<12,>=11; extra == "cufft12"
|
|
17
19
|
Provides-Extra: cufft13
|
|
@@ -74,4 +76,4 @@ everything they depend on as one block of C text. Compile it with
|
|
|
74
76
|
|
|
75
77
|
## Threading
|
|
76
78
|
|
|
77
|
-
Free-threaded CPython (3.
|
|
79
|
+
Free-threaded CPython (3.14t/3.15t) is supported: the compiled modules declare GIL-free operation and the GIL stays disabled after import. Any number of threads may call module-level functions, build, compile, plan and cache concurrently. Distinct objects may be used from distinct threads without synchronisation. One stateful object (a stream, capture, launcher, graph, composer, plan, pipeline, active set, host kernel or arg block) shared by several threads is memory-safe — its calls serialise and a consumed object raises — but the ORDER of those calls is the caller's responsibility, exactly as for a NumPy array or a CuPy stream. CUDA adds two rules of its own: a stream capture is begun, filled and ended by one thread, and while any capture is open no thread may synchronise the whole device (stream-level synchronisation is fine). GPU routes are supported on free-threaded 3.14; the CPU route runs elsewhere.
|
|
@@ -54,4 +54,4 @@ everything they depend on as one block of C text. Compile it with
|
|
|
54
54
|
|
|
55
55
|
## Threading
|
|
56
56
|
|
|
57
|
-
Free-threaded CPython (3.
|
|
57
|
+
Free-threaded CPython (3.14t/3.15t) is supported: the compiled modules declare GIL-free operation and the GIL stays disabled after import. Any number of threads may call module-level functions, build, compile, plan and cache concurrently. Distinct objects may be used from distinct threads without synchronisation. One stateful object (a stream, capture, launcher, graph, composer, plan, pipeline, active set, host kernel or arg block) shared by several threads is memory-safe — its calls serialise and a consumed object raises — but the ORDER of those calls is the caller's responsibility, exactly as for a NumPy array or a CuPy stream. CUDA adds two rules of its own: a stream capture is begun, filled and ended by one thread, and while any capture is open no thread may synchronise the whole device (stream-level synchronisation is fine). GPU routes are supported on free-threaded 3.14; the CPU route runs elsewhere.
|
|
@@ -287,6 +287,15 @@ cudaError_t cudaLaunchKernel(const void* func, dim3 grid, dim3 block, void** arg
|
|
|
287
287
|
AETHER_DRV(launch, cuLaunchKernel);
|
|
288
288
|
return fromDriver(launch(f, grid.x, grid.y, grid.z, block.x, block.y, block.z, static_cast<unsigned>(shared), stream(s), args, nullptr));
|
|
289
289
|
}
|
|
290
|
+
// CUDA 13's `<<<>>>` stub resolves a handle once (__cudaGetKernel) and launches through it; CUDA 12's nvcc defines
|
|
291
|
+
// __NV_LEGACY_LAUNCH and calls cudaLaunchKernel. The handle is the host stub itself, so both paths meet above.
|
|
292
|
+
cudaError_t __cudaGetKernel(cudaKernel_t* kernel, const void* func) {
|
|
293
|
+
*kernel = reinterpret_cast<cudaKernel_t>(const_cast<void*>(func));
|
|
294
|
+
return cudaSuccess;
|
|
295
|
+
}
|
|
296
|
+
cudaError_t __cudaLaunchKernel(cudaKernel_t k, dim3 grid, dim3 block, void** args, std::size_t shared, cudaStream_t s) {
|
|
297
|
+
return cudaLaunchKernel(reinterpret_cast<const void*>(k), grid, block, args, shared, s);
|
|
298
|
+
}
|
|
290
299
|
|
|
291
300
|
// ---- errors and versions -----------------------------------------------------------------------------------
|
|
292
301
|
cudaError_t cudaGetLastError(void) {
|
|
@@ -490,6 +499,7 @@ cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) {
|
|
|
490
499
|
// ---- the per-thread default stream spellings (`--default-stream per-thread` builds) -----------------------------
|
|
491
500
|
inline cudaStream_t perThreadStream(cudaStream_t s) { return s == nullptr ? reinterpret_cast<cudaStream_t>(CU_STREAM_PER_THREAD) : s; }
|
|
492
501
|
cudaError_t cudaLaunchKernel_ptsz(const void* f, dim3 g, dim3 b, void** a, std::size_t sh, cudaStream_t s) { return cudaLaunchKernel(f, g, b, a, sh, perThreadStream(s)); }
|
|
502
|
+
cudaError_t __cudaLaunchKernel_ptsz(cudaKernel_t k, dim3 g, dim3 b, void** a, std::size_t sh, cudaStream_t s) { return __cudaLaunchKernel(k, g, b, a, sh, perThreadStream(s)); }
|
|
493
503
|
cudaError_t cudaMallocAsync_ptsz(void** p, size_t n, cudaStream_t s) { return cudaMallocAsync(p, n, perThreadStream(s)); }
|
|
494
504
|
cudaError_t cudaFreeAsync_ptsz(void* p, cudaStream_t s) { return cudaFreeAsync(p, perThreadStream(s)); }
|
|
495
505
|
cudaError_t cudaMemcpyAsync_ptsz(void* d, const void* src, size_t n, cudaMemcpyKind k, cudaStream_t s) { return cudaMemcpyAsync(d, src, n, k, perThreadStream(s)); }
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
*
|
|
92
92
|
* Routed: exp, exp2, exp10, expm1, log, log2, log10, log1p, pow, sin,
|
|
93
93
|
* cos, tan, tanh, sinh, cosh, asinh, acosh, atanh, atan, atan2, asin,
|
|
94
|
-
* acos, cbrt, hypot,
|
|
95
|
-
* (vector ABI); abs, copysign, fmax, fmin (inline, see `hostvec::fmax`).
|
|
94
|
+
* acos, cbrt, hypot, rsqrt, floor, ceil, trunc, round, rint, fdim
|
|
95
|
+
* (vector ABI); sqrt, abs, copysign, fmax, fmin (inline, see `hostvec::fmax`).
|
|
96
96
|
* Not routed (no packet; stay on `std::`): fmod, fma, erf, erfc; the
|
|
97
97
|
* numpy-semantics `remainder` is built on `fmod`. `sincos` reaches the hook
|
|
98
98
|
* through its `sin` and `cos` legs: GCC does not vectorise a call that
|
|
@@ -285,7 +285,6 @@ AETHER_HVM_DEFINE_UNARY(asin, vasin)
|
|
|
285
285
|
AETHER_HVM_DEFINE_UNARY(acos, vacos)
|
|
286
286
|
AETHER_HVM_DEFINE_UNARY(cbrt, vcbrt)
|
|
287
287
|
AETHER_HVM_DEFINE_BINARY(hypot, vhypot)
|
|
288
|
-
AETHER_HVM_DEFINE_UNARY(sqrt, sqrt)
|
|
289
288
|
AETHER_HVM_DEFINE_UNARY(rsqrt, vrsqrt)
|
|
290
289
|
AETHER_HVM_DEFINE_UNARY(floor, vfloor)
|
|
291
290
|
AETHER_HVM_DEFINE_UNARY(expm1, vexpm1)
|
|
@@ -363,7 +362,9 @@ AETHER_HVM_ROUTE1(asin, std::asin(x))
|
|
|
363
362
|
AETHER_HVM_ROUTE1(acos, std::acos(x))
|
|
364
363
|
AETHER_HVM_ROUTE1(cbrt, std::cbrt(x))
|
|
365
364
|
AETHER_HVM_ROUTE2(hypot)
|
|
366
|
-
|
|
365
|
+
// sqrt: the compiler widens it natively (vsqrtpd), so no vector-ABI symbol.
|
|
366
|
+
inline double sqrt(double x) { return std::sqrt(x); }
|
|
367
|
+
inline float sqrt(float x) { return std::sqrt(x); }
|
|
367
368
|
AETHER_HVM_ROUTE1(rsqrt, 1.0f / std::sqrt(x))
|
|
368
369
|
AETHER_HVM_ROUTE1(floor, std::floor(x))
|
|
369
370
|
AETHER_HVM_ROUTE1(expm1, std::expm1(x))
|
|
Binary file
|
|
@@ -56,11 +56,6 @@ def _memo(item: CFunction, rank: int) -> CFunction:
|
|
|
56
56
|
return _REGISTRY.setdefault(item.name, item)
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
def real_type(width: str) -> str:
|
|
60
|
-
_check_width(width)
|
|
61
|
-
return _WIDTH[width][0]
|
|
62
|
-
|
|
63
|
-
|
|
64
59
|
def _t(width: str) -> str:
|
|
65
60
|
return f"aether_c_{width}_t"
|
|
66
61
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
# `aether/aether.h` (the umbrella) is deliberately not listed: it
|
|
20
20
|
# transitively includes every one of the ~28 excluded headers, so it is
|
|
21
21
|
# not yet part of the payload either.
|
|
22
|
+
aether/accum/TwoSum.h
|
|
22
23
|
aether/accum/run.h
|
|
23
24
|
aether/device.h
|
|
24
25
|
aether/device/Device.h
|
|
@@ -51,6 +52,7 @@ aether/linalg/Cholesky.h
|
|
|
51
52
|
aether/linalg/Eigh.h
|
|
52
53
|
aether/linalg/Lu.h
|
|
53
54
|
aether/linalg/Triangular.h
|
|
55
|
+
aether/linalg/WarpEigh.h
|
|
54
56
|
aether/linalg/detail/Common.h
|
|
55
57
|
aether/linalg/linalg.h
|
|
56
58
|
aether/linalg/team.h
|
|
@@ -35,7 +35,8 @@ classifiers = [
|
|
|
35
35
|
dependencies = []
|
|
36
36
|
|
|
37
37
|
[project.optional-dependencies]
|
|
38
|
-
|
|
38
|
+
# test_arrays compares with numpy; test_ft_payload uses raptor's free-threading rows
|
|
39
|
+
test = ["pytest", "numpy", "raptor-core>=0.7.3,<0.8"]
|
|
39
40
|
# GPU FFTs: cuFFT, opened on the first device transform (not bundled: NVIDIA licence; not imported otherwise)
|
|
40
41
|
cufft12 = ["nvidia-cufft-cu12>=11,<12"]
|
|
41
42
|
cufft13 = ["nvidia-cufft>=12,<13"]
|
|
@@ -67,7 +68,7 @@ provider = "scikit_build_core.metadata.setuptools_scm"
|
|
|
67
68
|
[tool.pytest.ini_options]
|
|
68
69
|
testpaths = ["tests"]
|
|
69
70
|
markers = [
|
|
70
|
-
"ft: free-threading rows (raptor.conformance.freethreading) -- skip on a GIL build; select with -m ft on 3.
|
|
71
|
+
"ft: free-threading rows (raptor.conformance.freethreading) -- skip on a GIL build; select with -m ft on 3.14t/3.15t.",
|
|
71
72
|
]
|
|
72
73
|
# Makes `import aether_dsc` work against the checked-out tree without an
|
|
73
74
|
# install — this repo root, prepended to sys.path before collection (mirrors
|
|
@@ -6,4 +6,4 @@ so the marker cannot live in pyproject.toml."""
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def pytest_configure(config):
|
|
9
|
-
config.addinivalue_line("markers", "ft: the free-threaded smoke rows (run on 3.
|
|
9
|
+
config.addinivalue_line("markers", "ft: the free-threaded smoke rows (run on 3.14t/3.15t with -m ft)")
|
|
@@ -393,3 +393,16 @@ def test_the_target_deprecation_notice_does_not_count_as_a_diagnostic():
|
|
|
393
393
|
"nvrtc: warning: Architectures prior to '<compute/sm>_75' are deprecated and may be "
|
|
394
394
|
"removed in a future release")
|
|
395
395
|
assert not _is_target_deprecation_notice("error: identifier \"foo\" is undefined")
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def test_release_wheel_jobs_build_for_the_portable_isa():
|
|
399
|
+
"""A source build targets this machine (-march=native); every wheel job must say x86-64-v3 instead."""
|
|
400
|
+
release = Path(__file__).resolve().parents[2] / ".github" / "workflows" / "release.yml"
|
|
401
|
+
if not release.is_file():
|
|
402
|
+
pytest.skip("release.yml is not next to the tests (installed-wheel run)")
|
|
403
|
+
jobs = re.split(r"(?m)^ (?=[A-Za-z0-9_-]+:\s*$)", release.read_text())
|
|
404
|
+
wheel_jobs = [j for j in jobs if "cibuildwheel" in j and "runs-on" in j]
|
|
405
|
+
assert wheel_jobs, "no cibuildwheel job found: the pattern needs updating"
|
|
406
|
+
for job in wheel_jobs:
|
|
407
|
+
envs = len(re.findall(r"CIBW_ENVIRONMENT(?:_LINUX|_MACOS)?:", job))
|
|
408
|
+
assert envs and job.count("AETHER_MARCH=x86-64-v3") >= envs, f"wheel job {job.split(':', 1)[0]}: every CIBW_ENVIRONMENT needs AETHER_MARCH=x86-64-v3"
|
|
@@ -5,6 +5,7 @@ numpy, cupy and torch rows skip when that library is absent (aether itself needs
|
|
|
5
5
|
|
|
6
6
|
import ctypes
|
|
7
7
|
import gc
|
|
8
|
+
import importlib.util
|
|
8
9
|
import pathlib
|
|
9
10
|
import struct
|
|
10
11
|
import subprocess
|
|
@@ -30,6 +31,7 @@ def _gpu():
|
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
gpu = pytest.mark.skipif(not _gpu(), reason="needs a CUDA plugin that loads and a device")
|
|
34
|
+
needs_cupy = pytest.mark.skipif(importlib.util.find_spec("cupy") is None, reason="needs cupy (the subprocess rows import it)")
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
def _run(code, **env):
|
|
@@ -280,6 +282,7 @@ def test_zero_fill_capture_two_replays():
|
|
|
280
282
|
|
|
281
283
|
|
|
282
284
|
@gpu
|
|
285
|
+
@needs_cupy
|
|
283
286
|
def test_staged_upload_then_dropping_its_stream_does_not_break_the_next_copy():
|
|
284
287
|
"""A pageable host to device copy on a user stream leaves the staging buffer busy; the next staged copy must
|
|
285
288
|
not wait on that stream, which the caller has since destroyed (it used to segfault)."""
|
|
@@ -300,6 +303,7 @@ def test_staged_upload_then_dropping_its_stream_does_not_break_the_next_copy():
|
|
|
300
303
|
@gpu
|
|
301
304
|
@pytest.mark.parametrize("blocking", [False, True])
|
|
302
305
|
@pytest.mark.parametrize("mode", ["legacy", "stream"])
|
|
306
|
+
@needs_cupy
|
|
303
307
|
def test_gc_free_inside_global_capture(mode, blocking):
|
|
304
308
|
out = _run(f"""
|
|
305
309
|
import gc, aether, cupy as cp
|
|
@@ -348,6 +352,7 @@ def test_early_drop_after_launch_is_stream_ordered(mode):
|
|
|
348
352
|
|
|
349
353
|
# ---- row 6: lifetimes at exit
|
|
350
354
|
@gpu
|
|
355
|
+
@needs_cupy
|
|
351
356
|
def test_arrays_alive_at_exit_and_stream_object_held():
|
|
352
357
|
out = _run("""
|
|
353
358
|
import aether, cupy as cp
|
|
@@ -363,7 +368,7 @@ def test_arrays_alive_at_exit_and_stream_object_held():
|
|
|
363
368
|
assert out.returncode == 0 and out.stdout.strip() == "ok", (out.returncode, out.stderr[-400:])
|
|
364
369
|
|
|
365
370
|
|
|
366
|
-
# ---- row 7: threads (the free-threaded smoke when run on 3.
|
|
371
|
+
# ---- row 7: threads (the free-threaded smoke when run on 3.14t/3.15t with -m ft)
|
|
367
372
|
@pytest.mark.ft
|
|
368
373
|
def test_threads_allocate_free_export():
|
|
369
374
|
errors, before = [], _core._exports_live()
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
"""`aether_dsc.openmp()`: where the one shipped OpenMP runtime is, for the packages that link it."""
|
|
5
|
+
import ctypes
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
5
8
|
import sys
|
|
6
9
|
|
|
10
|
+
import pytest
|
|
11
|
+
|
|
7
12
|
import aether_dsc
|
|
8
13
|
|
|
9
14
|
|
|
@@ -28,3 +33,31 @@ def test_a_package_with_the_runtime_reports_its_file_and_flags(tmp_path, monkeyp
|
|
|
28
33
|
assert found.rpath() == str(omp)
|
|
29
34
|
assert f"-Wl,-rpath,{omp}" in found.link_flags and str(omp / name) in found.link_flags
|
|
30
35
|
assert "-fopenmp" in found.compile_flags
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
_RUNTIME = re.compile(r"lib(gomp|omp|iomp5)[^/]*\.(so(\.\d+)*|dylib)$")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _loaded_runtimes():
|
|
42
|
+
"""The distinct OpenMP runtime files mapped into this process."""
|
|
43
|
+
if sys.platform == "darwin":
|
|
44
|
+
dyld = ctypes.CDLL(None)
|
|
45
|
+
dyld._dyld_get_image_name.restype = ctypes.c_char_p
|
|
46
|
+
names = [dyld._dyld_get_image_name(i).decode() for i in range(dyld._dyld_image_count())]
|
|
47
|
+
else:
|
|
48
|
+
names = [line.split()[-1] for line in open("/proc/self/maps") if "/" in line.split()[-1]]
|
|
49
|
+
return {os.path.realpath(n) for n in names if _RUNTIME.search(n)}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_one_openmp_runtime_is_loaded_and_it_is_the_shipped_one():
|
|
53
|
+
shipped = aether_dsc.openmp()
|
|
54
|
+
if shipped is None:
|
|
55
|
+
pytest.skip("this aether install ships no OpenMP runtime (a source checkout)")
|
|
56
|
+
import aether
|
|
57
|
+
from aether import fft
|
|
58
|
+
|
|
59
|
+
fft.fft(aether.zeros((64, 4096, 2), "float64")) # the first OpenMP region runs here
|
|
60
|
+
runtimes = _loaded_runtimes()
|
|
61
|
+
assert runtimes == {os.path.realpath(str(shipped.library))}, runtimes
|
|
62
|
+
if (os.cpu_count() or 1) > 1 and "OMP_NUM_THREADS" not in os.environ:
|
|
63
|
+
assert ctypes.CDLL(str(shipped.library)).omp_get_max_threads() > 1
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketArcTrig.h
RENAMED
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketExpLog.h
RENAMED
|
File without changes
|
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketHyperbolic.h
RENAMED
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketMathCore.h
RENAMED
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketMisc.h
RENAMED
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketRounding.h
RENAMED
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/backend/cpu/simd/math/PacketSinCos.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aether_dsc-0.7.2 → aether_dsc-0.7.3}/_sdist_include/aether/math/detail/HostVectorMathRoute.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|