| 2 Mar 2023 |
connor (he/him) | I'll check with MIN_ARCH too -- when I got rid of GPU_TARGET it switched to building the default set of GPU targets and I saw this in the CMake logs:
magma> -- Found CUDA
magma> -- CUDA_CUDART_LIBRARY: CUDA::cudart
magma> -- compile for CUDA arch 3.0 (Kepler)
magma> -- compile for CUDA arch 3.5 (Kepler)
magma> -- compile for CUDA arch 3.7 (Kepler)
magma> -- compile for CUDA arch 5.0 (Maxwell)
magma> -- compile for CUDA arch 6.0 (Pascal)
magma> -- Define -DMAGMA_HAVE_CUDA -DMAGMA_CUDA_ARCH_MIN=300
| 22:56:23 |
SomeoneSerge (matrix works sometimes) | Right, I see this too. Did you try providing empty GPU_TARGET? | 22:57:04 |
SomeoneSerge (matrix works sometimes) | In reply to @ss:someonex.net Well, if they just switched to FindCUDAToolkit, that would've been perfect LOOOOL | 22:57:54 |
SomeoneSerge (matrix works sometimes) | They do use FindCUDAToolkit, but then they wrap it into their own set of weird options | 22:58:13 |
connor (he/him) | I just removed GPU_TARGET entirely, I'll try it with no value next | 22:58:29 |
connor (he/him) | Okay, well setting it to the empty string definitely gave a different result:
magma> -- Found CUDA
magma> -- CUDA_CUDART_LIBRARY: CUDA::cudart
magma> -- Define -DMAGMA_HAVE_CUDA -DMAGMA_CUDA_ARCH_MIN=890
| 22:59:16 |
SomeoneSerge (matrix works sometimes) | They set the default list here: https://bitbucket.org/icl/magma/src/f4ec79e2c13a2347eff8a77a3be6f83bc2daec20/CMakeLists.txt#lines-120 | 22:59:39 |
connor (he/him) | After this is done compiling, what's the easiest way to find out what architectures it built for? Would
cuobjdump result/lib/blarg | rg 'arch =' | sort | uniq
do the trick?
| 23:00:43 |
SomeoneSerge (matrix works sometimes) | Yes | 23:00:55 |
connor (he/him) | What's the package name that provides that utility? I'd like to nix shell into it and not install CUDA system-wide :l | 23:01:31 |
SomeoneSerge (matrix works sometimes) | cudaPackages.cuda_cuobjdump | 23:01:59 |
SomeoneSerge (matrix works sometimes) | or something like it | 23:02:03 |
connor (he/him) | Awwww my heart ;(
$ cuobjdump ./result/lib/libmagma.so | rg "arch =" | sort -u
arch = sm_52
| 23:03:10 |
SomeoneSerge (matrix works sometimes) | Redacted or Malformed Event | 23:10:05 |
SomeoneSerge (matrix works sometimes) | Redacted or Malformed Event | 23:10:08 |
SomeoneSerge (matrix works sometimes) | Redacted or Malformed Event | 23:10:13 |
SomeoneSerge (matrix works sometimes) | Redacted or Malformed Event | 23:10:27 |
SomeoneSerge (matrix works sometimes) | In reply to @connorbaker:matrix.org
Awwww my heart ;(
$ cuobjdump ./result/lib/libmagma.so | rg "arch =" | sort -u
arch = sm_52
Strange | 23:13:25 |
SomeoneSerge (matrix works sometimes) | I think they end up reseting CUDA_ARCHITECTURES to an empty list | 23:14:38 |
SomeoneSerge (matrix works sometimes) | CMakeCache.txt:CMAKE_CUDA_ARCHITECTURES:STRING=52
CMakeCache.txt:CUDA_ARCHITECTURES:UNINITIALIZED=86
| 23:19:46 |
SomeoneSerge (matrix works sometimes) | Ok, I've got a good feeling about this one | 23:20:59 |
SomeoneSerge (matrix works sometimes) | In reply to @hexa:lossy.network we probably need https://github.com/numba/numba/pull/8691 https://github.com/numba/numba/pull/8691#issuecomment-1452616968 | 23:23:24 |
hexa | what's the tl;dr? | 23:24:27 |
hexa | I did apply that series in python-updates | 23:24:37 |
SomeoneSerge (matrix works sometimes) | I saw that | 23:24:42 |
SomeoneSerge (matrix works sometimes) | The reason they weren't merging the PR was that they were using Anaconda's channels for their CI, and Anaconda never shipped the new numpy. AFAIU, they switched to conda-forge and are about to merge | 23:25:30 |
SomeoneSerge (matrix works sometimes) | In reply to @ss:someonex.net
CMakeCache.txt:CMAKE_CUDA_ARCHITECTURES:STRING=52
CMakeCache.txt:CUDA_ARCHITECTURES:UNINITIALIZED=86
❯ cuobjdump /nix/store/mkrv74b38zx1afkkpj55xmnm68rgmywq-magma-2.7.1/lib/libmagma.so | rg 'arch =' | sort | uniq
arch = sm_86
| 23:31:22 |
SomeoneSerge (matrix works sometimes) | connor (he/him): how bad would it be if magma accepted both gpuTargets and cudaPackages.cudaFlags, but only used the latter for cuda capabilities? | 23:49:13 |
| 3 Mar 2023 |
connor (he/him) | Hmm... So from what I could tell when I originally started on the Magma derivation, gpuTargets was used solely for AMD GPUs. In the hip attribute set (their equivalent of cudaPackages?), they have gpuTargets which is the equivalent of our cudaCapabilities (I think). In the original derivation, the gpuTargets attribute Magma takes had precedence over whatever hip.gpuTargets was. | 00:56:31 |
connor (he/him) | I like the idea of specifying per-package GPU target overrides, so when I refactored the derivation I made gpuTargets also take precedence over cudaPackages's capabilities | 00:57:17 |