Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on AMD using SCALE #99

Open
ashirviskas opened this issue Jul 18, 2024 · 2 comments
Open

Building on AMD using SCALE #99

ashirviskas opened this issue Jul 18, 2024 · 2 comments

Comments

@ashirviskas
Copy link

ashirviskas commented Jul 18, 2024

Hi! I'm very passionate about this project and I tried compiling it on my AMD 7900XTX using SCALE. Here is my current progress on Arch Linux:

  • Installed gcc11, as 14 did not work.
  • Downloaded SCALE and exported the paths
export SCALE_PATH="some/path/targets/gfx1100"

export PATH="${SCALE_PATH}/bin:$PATH"

export PATH="${SCALE_PATH}/bin:$PATH"
export LD_LIBRARY_PATH="${SCALE_PATH}/lib"
export CUDA_HOME="${SCALE_PATH}"
export CUDA_PATH="${SCALE_PATH}"
  • Edited CMAKE_CUDA_FLAGS in CMakeLists.txt, removing --use-local-env as that wasn't working on SCALE - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -g -lineinfo -use_fast_math")
  • Started building cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER="${SCALE_PATH}/bin/nvcc" -DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
  • Stuck here now cmake --build . --config Release -j8:
[ 27%] Building CUDA object source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/EditKernelsLauncher.cu.o
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/DataAccessKernels.cu:1:
/home/redacted/projects/alien/source/EngineGpuKernels/DataAccessKernels.cuh:4:10: fatal error: 'sm_60_atomic_functions.h' file not found
#include "sm_60_atomic_functions.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/DebugKernels.cu:1:
/home/redacted/projects/alien/source/EngineGpuKernels/DebugKernels.cuh:4:10: fatal error: 'sm_60_atomic_functions.h' file not found
#include "sm_60_atomic_functions.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/EditKernels.cu:1:
/home/redacted/projects/alien/source/EngineGpuKernels/EditKernels.cuh:8:10: fatal error: 'sm_60_atomic_functions.h' file not found
#include "sm_60_atomic_functions.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/DataAccessKernelsLauncher.cu:1:
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/DataAccessKernelsLauncher.cuh:7:
/home/redacted/projects/alien/source/EngineGpuKernels/Base.cuh:6:10: fatal error: 'device_launch_parameters.h' file not found
#include <device_launch_parameters.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/FlowFieldKernels.cu:1:
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/FlowFieldKernels.cuh:3:
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/Math.cuh:5:
/home/redacted/projects/alien/source/EngineGpuKernels/Base.cuh:6:10: fatal error: 'device_launch_parameters.h' file not found
#include <device_launch_parameters.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/EditKernelsLauncher.cu:1:
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/EditKernelsLauncher.cuh:6:
/home/redacted/projects/alien/source/EngineGpuKernels/Base.cuh:6:10: fatal error: 'device_launch_parameters.h' file not found
#include <device_launch_parameters.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 28%] Building CUDA object source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/GarbageCollectorKernels.cu.o
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:122: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/DebugKernels.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:92: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/DataAccessKernels.cu.o] Error 1
1 error generated when compiling for gfx1100.
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:167: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/FlowFieldKernels.cu.o] Error 1
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:137: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/EditKernels.cu.o] Error 1
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:107: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/DataAccessKernelsLauncher.cu.o] Error 1
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:152: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/EditKernelsLauncher.cu.o] Error 1
In file included from /home/redacted/projects/alien/source/EngineGpuKernels/GarbageCollectorKernels.cu:1:
/home/redacted/projects/alien/source/EngineGpuKernels/GarbageCollectorKernels.cuh:4:10: fatal error: 'sm_60_atomic_functions.h' file not found
#include "sm_60_atomic_functions.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated when compiling for gfx1100.
make[2]: *** [source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/build.make:182: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/GarbageCollectorKernels.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:438: source/EngineGpuKernels/CMakeFiles/EngineGpuKernels.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 28%] Linking CXX static library libNetwork.a
[ 28%] Built target Network
make: *** [Makefile:91: all] Error 2
cmake --build . --config Release -j8  67.06s user 2.87s system 428% cpu 16.301 total

I know that something about atomic functions is crucial for the performance of the project, but maybe I can work around this somehow? Or maybe I'm misconfiguring something and it is an easy fix?

@Sheeo
Copy link

Sheeo commented Jul 18, 2024

Hey @ashirviskas -- pretty sure this is not a problem for the authors of alien (Cool project btw!) to consider, given that it's a compatibility issue in the SCALE compiler toolkit which we'll fix over there.

@ashirviskas
Copy link
Author

Hey @Sheeo, thanks for the response here! To the creator of ALIEN, @chrxh - we're solving these issues one by one in SCALE discord server, might be running on AMD soon 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants