lamikr / rocm_sdk_builder

Other
113 stars 8 forks source link

Trying to compile for RX5500: Unknown GPU architecture 'gfx1012' #30

Open Stefan-Olt opened 1 month ago

Stefan-Olt commented 1 month ago

Hello, I'm trying to compile for a RX 5500 on Linux Mint (Ubuntu 22.04 LTS), so I only selected gfx1012, unfortunately at some point I get the error that the GPU type is unknown:

-- LIBOMPTARGET: Building DeviceRTL. Using clang: /opt/rocm_sdk_611/bin/clang, llvm-link: /opt/rocm_sdk_611/bin/llvm-link and opt: /opt/rocm_sdk_611/bin/opt
CMake Error at libomptarget/cmake/Modules/LibomptargetUtils.cmake:26 (message):
  LIBOMPTARGET: Unknown GPU architecture 'gfx1012'
Call Stack (most recent call first):
  libomptarget/DeviceRTL/CMakeLists.txt:468 (libomptarget_error_say)

-- Configuring incomplete, errors occurred!
See also "/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeOutput.log".
See also "/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeError.log".
configure failed: llvm-project_openmp

This is the CMakeError.log:

Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
clang version 17.0.0 (/home/idn/source/rocm_sdk_builder/src_projects/llvm-project/clang 9daa9b63ac8fd6706fdb9f51be564ef0878d0eae)
Target: x86_64-mageia-linux
Thread model: posix
InstalledDir: /opt/rocm_sdk_611/bin
Performing C++ SOURCE FILE Test OPENMP_HAVE_ONEAPI_COMPILER failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_dc872/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_dc872.dir/build.make CMakeFiles/cmTC_dc872.dir/build
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird betreten
Building CXX object CMakeFiles/cmTC_dc872.dir/src.cxx.o
/opt/rocm_sdk_611/bin/clang++ -DOPENMP_HAVE_ONEAPI_COMPILER  -std=c++17 -MD -MT CMakeFiles/cmTC_dc872.dir/src.cxx.o -MF CMakeFiles/cmTC_dc872.dir/src.cxx.o.d -o CMakeFiles/cmTC_dc872.dir/src.cxx.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx
/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx:4:30: error: expected unqualified-id
    4 |                              not oneAPI
      |                              ^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_dc872.dir/build.make:79: CMakeFiles/cmTC_dc872.dir/src.cxx.o] Fehler 1
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird verlassen
gmake: *** [Makefile:127: cmTC_dc872/fast] Fehler 2

Source file was:
#if (defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER))
                             int main() { return 0; }
                             #else
                             not oneAPI
                             #endif
Performing C++ SOURCE FILE Test OPENMP_HAVE_WMAYBE_UNINITIALIZED_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f8122/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_f8122.dir/build.make CMakeFiles/cmTC_f8122.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f8122.dir/src.cxx.o
/opt/rocm_sdk_611/bin/clang++ -DOPENMP_HAVE_WMAYBE_UNINITIALIZED_FLAG  -Wmaybe-uninitialized -std=c++17 -MD -MT CMakeFiles/cmTC_f8122.dir/src.cxx.o -MF CMakeFiles/cmTC_f8122.dir/src.cxx.o.d -o CMakeFiles/cmTC_f8122.dir/src.cxx.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx
warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
1 warning generated.
Linking CXX executable cmTC_f8122
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f8122.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang++ -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_f8122.dir/src.cxx.o -o cmTC_f8122 
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test LIBOMP_HAVE_WCLASS_MEMACCESS_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_512d9/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_512d9.dir/build.make CMakeFiles/cmTC_512d9.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_512d9.dir/src.cxx.o
/opt/rocm_sdk_611/bin/clang++ -DLIBOMP_HAVE_WCLASS_MEMACCESS_FLAG  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic    -Wclass-memaccess -std=c++17 -MD -MT CMakeFiles/cmTC_512d9.dir/src.cxx.o -MF CMakeFiles/cmTC_512d9.dir/src.cxx.o.d -o CMakeFiles/cmTC_512d9.dir/src.cxx.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx
warning: unknown warning option '-Wclass-memaccess'; did you mean '-Wclass-varargs'? [-Wunknown-warning-option]
1 warning generated.
Linking CXX executable cmTC_512d9
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_512d9.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang++  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_512d9.dir/src.cxx.o -o cmTC_512d9 
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_99c33/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_99c33.dir/build.make CMakeFiles/cmTC_99c33.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_99c33.dir/src.cxx.o
/opt/rocm_sdk_611/bin/clang++ -DLIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic    -Wstringop-overflow=0 -std=c++17 -MD -MT CMakeFiles/cmTC_99c33.dir/src.cxx.o -MF CMakeFiles/cmTC_99c33.dir/src.cxx.o.d -o CMakeFiles/cmTC_99c33.dir/src.cxx.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx
warning: unknown warning option '-Wstringop-overflow=0'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option]
1 warning generated.
Linking CXX executable cmTC_99c33
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_99c33.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang++  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_99c33.dir/src.cxx.o -o cmTC_99c33 
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test LIBOMP_HAVE_WSTRINGOP_TRUNCATION_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f3f72/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_f3f72.dir/build.make CMakeFiles/cmTC_f3f72.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f3f72.dir/src.cxx.o
/opt/rocm_sdk_611/bin/clang++ -DLIBOMP_HAVE_WSTRINGOP_TRUNCATION_FLAG  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic    -Wstringop-truncation -std=c++17 -MD -MT CMakeFiles/cmTC_f3f72.dir/src.cxx.o -MF CMakeFiles/cmTC_f3f72.dir/src.cxx.o.d -o CMakeFiles/cmTC_f3f72.dir/src.cxx.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.cxx
warning: unknown warning option '-Wstringop-truncation'; did you mean '-Wstring-concatenation'? [-Wunknown-warning-option]
1 warning generated.
Linking CXX executable cmTC_f3f72
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f3f72.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang++  -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_f3f72.dir/src.cxx.o -o cmTC_f3f72 
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0; }
Performing C SOURCE FILE Test LIBOMP_HAVE_MMIC_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_652e9/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_652e9.dir/build.make CMakeFiles/cmTC_652e9.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_652e9.dir/src.c.o
/opt/rocm_sdk_611/bin/clang -DLIBOMP_HAVE_MMIC_FLAG  -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -mmic   -mmic -MD -MT CMakeFiles/cmTC_652e9.dir/src.c.o -MF CMakeFiles/cmTC_652e9.dir/src.c.o.d -o CMakeFiles/cmTC_652e9.dir/src.c.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.c
clang: error: unknown argument: '-mmic'
clang: error: unknown argument: '-mmic'
gmake[1]: *** [CMakeFiles/cmTC_652e9.dir/build.make:79: CMakeFiles/cmTC_652e9.dir/src.c.o] Error 1
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_652e9/fast] Error 2

Source file was:
int main(void) { return 0; }
Determining if the _aligned_malloc exist failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_60bc7/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_60bc7.dir/build.make CMakeFiles/cmTC_60bc7.dir/build
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_60bc7.dir/CheckSymbolExists.c.o
/opt/rocm_sdk_611/bin/clang   -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -MD -MT CMakeFiles/cmTC_60bc7.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_60bc7.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_60bc7.dir/CheckSymbolExists.c.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier '_aligned_malloc'
    8 |   return ((int*)(&_aligned_malloc))[argc];
      |                   ^
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_60bc7.dir/build.make:79: CMakeFiles/cmTC_60bc7.dir/CheckSymbolExists.c.o] Fehler 1
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird verlassen
gmake: *** [Makefile:127: cmTC_60bc7/fast] Fehler 2

File /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <malloc.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef _aligned_malloc
  return ((int*)(&_aligned_malloc))[argc];
#else
  (void)argc;
  return 0;
#endif
}
Performing C SOURCE FILE Test LIBOMP_HAVE_UNDEFINED_VERSION_FLAG failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_93e2b/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_93e2b.dir/build.make CMakeFiles/cmTC_93e2b.dir/build
gmake[1]: Entering directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_93e2b.dir/src.c.o
/opt/rocm_sdk_611/bin/clang -DLIBOMP_HAVE_UNDEFINED_VERSION_FLAG  -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -Wl,--undefined-version -MD -MT CMakeFiles/cmTC_93e2b.dir/src.c.o -MF CMakeFiles/cmTC_93e2b.dir/src.c.o.d -o CMakeFiles/cmTC_93e2b.dir/src.c.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.c
clang: warning: -Wl,--undefined-version: 'linker' input unused [-Wunused-command-line-argument]
Linking C executable cmTC_93e2b
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_93e2b.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -Wl,--undefined-version -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_93e2b.dir/src.c.o -o cmTC_93e2b 
/usr/bin/ld: unrecognized option '--undefined-version'
/usr/bin/ld: use the --help option for usage information
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_93e2b.dir/build.make:100: cmTC_93e2b] Error 1
gmake[1]: Leaving directory '/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_93e2b/fast] Error 2

Source file was:
int main(void) { return 0; }
Performing C SOURCE FILE Test LIBOMP_HAVE_PSAPI failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_78526/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_78526.dir/build.make CMakeFiles/cmTC_78526.dir/build
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_78526.dir/src.c.o
/opt/rocm_sdk_611/bin/clang -DLIBOMP_HAVE_PSAPI  -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic  -MD -MT CMakeFiles/cmTC_78526.dir/src.c.o -MF CMakeFiles/cmTC_78526.dir/src.c.o.d -o CMakeFiles/cmTC_78526.dir/src.c.o -c /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.c
/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp/src.c:1:10: fatal error: 'windows.h' file not found
    1 | #include <windows.h>
      |          ^~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_78526.dir/build.make:79: CMakeFiles/cmTC_78526.dir/src.c.o] Fehler 1
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird verlassen
gmake: *** [Makefile:127: cmTC_78526/fast] Fehler 2

Source file was:
#include <windows.h>
  #include <psapi.h>
  int main(int artc, char** argv) {
    return EnumProcessModules(NULL, NULL, 0, NULL);
  }
Determining if the function __atomic_load_1 exists failed with the following output:
Change Dir: /home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_056d4/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_056d4.dir/build.make CMakeFiles/cmTC_056d4.dir/build
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o
/opt/rocm_sdk_611/bin/clang   -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -DCHECK_FUNCTION_EXISTS=__atomic_load_1 -MD -MT CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c
Linking C executable cmTC_056d4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_056d4.dir/link.txt --verbose=1
/opt/rocm_sdk_611/bin/clang -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-enum-constexpr-conversion -Wno-extra -Wno-pedantic -DCHECK_FUNCTION_EXISTS=__atomic_load_1 -L/usr/lib64 -L/opt/rocm_sdk_611/lib64 -L/opt/rocm_sdk_611/lib -L/opt/rocm_sdk_611/hip/lib -Wl,-rpath-link,/usr/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/lib -Wl,-rpath-link,/opt/rocm_sdk_611/lib64 -Wl,-rpath-link,/opt/rocm_sdk_611/hip/lib  CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o -o cmTC_056d4 
/usr/bin/ld: CMakeFiles/cmTC_056d4.dir/CheckFunctionExists.c.o: in function `main':
CheckFunctionExists.c:(.text+0x17): undefined reference to `__atomic_load_1'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_056d4.dir/build.make:100: cmTC_056d4] Fehler 1
gmake[1]: Verzeichnis „/home/idn/source/rocm_sdk_builder/builddir/016_03_llvm_project_openmp/CMakeFiles/CMakeTmp“ wird verlassen
gmake: *** [Makefile:127: cmTC_056d4/fast] Fehler 2

Is this a bug or am I doing something wrong?

lamikr commented 4 weeks ago

I think nobody has yet tried to use 5500 XT, it would be nice to get it however supported as I think it's pretty power efficient gpu if there is just enough memory to run models.

It may take a while until I have time to check this one but I can try to make branch which would have similar type of changes that are for 1010 to be made for this one also.

Stefan-Olt commented 4 weeks ago

Thanks, great to hear! I will see if I can run a 1010 build on it with setting a HSA_OVERRIDE_GFX_VERSION=10.1.0 environment variable, just like the AMD builds run on my RX 6600 with HSA_OVERRIDE_GFX_VERSION=10.3.0

lamikr commented 3 weeks ago

Did you had time to test the gfx5500 yet by building it for gfx1010?

Stefan-Olt commented 3 weeks ago

Not yet, I will test today. On the machine with the RX 5500 the build crashes, I assume not enough RAM. So I will have to compile it on another machine and then copy it (both run the same OS)

Stefan-Olt commented 3 weeks ago

I have tested it now and it works. I also tried a real-world PyTorch application (openai-whisper), but it complained that librocm_smi64.so.5 could not be found. I solved that using ln -s librocm_smi64.so.2.8 librocm_smi64.so.5. Not sure why PyTorch has the wrong version. But RX 5500 seems to be a lot slower for whisper than my RX 6600 (both 8GB)

lamikr commented 3 weeks ago

Nice. Would you have time to document under docs/ how to test the whisper?

I was looking for possibility to build the ollama. Have not tested it yet. https://github.com/ollama/ollama/blob/main/docs/development.md

I think they added to ollama the AMD support some months ago, not fully sure is some merges still pending.

Stefan-Olt commented 3 weeks ago

Whisper is just using PyTorch, so by itself it's independent of cuda/rocm. I just tested it to check if a real-world application is running on a RX 5500. The entire test is basically:

source /opt/rock_sdk_611/bin/env_rocm.sh
pip3 install openai-whisper
whisper --model medium some_speech_audio_file.mp3

How exactly do you want me to document that? The medium model still fits in 8GB, the large model needs 12GB/16 GB of VRAM. And it needs ffmpeg to be installed

lamikr commented 3 weeks ago

Ok, so whisper does not have any nvidia dependencies in itself when pip is used to install it?

Maybe there could then be own audio_whisper folder either under docs/examples/pytorch which has the pip install command and then the launch script examples for different model sizes.

Do you think that makes sense?

And if there is some more ways to tune it (kind of longer example with multiple steps) then it could go under docs/tutorials