NumPower / numpower

PHP extension for efficient scientific computing and array manipulation with GPU support
https://numpower.org
Other
185 stars 4 forks source link

CUDA on AMD #62

Closed zaunere closed 1 month ago

zaunere commented 1 month ago

Hello,

I'm guessing I can't use CUDA with an AMD CPU?

/home/working/build/numpower/src/ndarray.c: In function 'NDArray_ToGD': /home/working/build/numpower/src/ndarray.c:188:13: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] 188 | __m256i alpha_mask = _mm256_set_epi32(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF); | ^~~~~~ In file included from /usr/lib/gcc/x86_64-redhat-linux/13/include/immintrin.h:43, from /home/working/build/numpower/src/ndarray.c:14: /usr/lib/gcc/x86_64-redhat-linux/13/include/avxintrin.h:1274:1: error: inlining failed in call to 'always_inline' '_mm256_set_epi32': target specific option mismatch

To note, the Nvidia/nvcc/etc tools are installed and seem to work normally with pytorch/etc.

Thanks,

Hans

henrique-borba commented 1 month ago

Hi @zaunere

Are you using make install-cuda instead of make install? Make sure the compilation used the following commands:

phpize
./configure --with-cuda
make install-cuda
zaunere commented 1 month ago

Hello,

I wasn't using make install-cuda :(

I always do a `make && make install

Using install-cuda seems to have worked.

Thank you,

Hans

henrique-borba commented 1 month ago

No problem, let me know if you have any further questions/problems. I will close this issue.