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

What is the magic incantation to build rocfft with hip? #132

Closed
Lucretia opened this issue Feb 8, 2020 · 14 comments
Closed

What is the magic incantation to build rocfft with hip? #132

Lucretia opened this issue Feb 8, 2020 · 14 comments

Comments

@Lucretia
Copy link
Contributor

Lucretia commented Feb 8, 2020

$ CXX=/usr/lib/hcc/3.0/bin/hcc cmake -DBUILD_CLIENTS_TESTS=ON -DBUILD_CLIENTS_BENCHMARKS=ON -DAMDGPU_TARGETS=gfx701 -DHIP_PLATFORM=hip-clang -DUSE_HIP_CLANG=ON -DHIP_COMPILER=clang  ../
-- The CXX compiler identification is Clang 10.0.0
-- Check for working CXX compiler: /usr/lib/hcc/3.0/bin/hcc
-- Check for working CXX compiler: /usr/lib/hcc/3.0/bin/hcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Use hip-clang to build for amdgpu backend
-- Building with ROCm tools
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:905 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:1027 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1727 (_Boost_MISSING_DEPENDENCIES)
  clients/tests/CMakeLists.txt:23 (find_package)


-- Boost version: 1.72.0
-- Found the following Boost libraries:
--   program_options
-- Found GTest: /usr/lib/libgtest.so  
-- Found FFTW: /usr/include (Required is at least version "3.0") 
-- FindFFTW configured variables:
-- FFTW_INCLUDE_DIRS: /usr/include
-- FFTW_LIBRARIES: /usr/lib/libfftw3f.so;/usr/lib/libfftw3.so
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build

Then the build gives:

make -j4
Scanning dependencies of target rocfft-kernel-generator
[  2%] Building CXX object library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/generator.file.cpp.o
[  4%] Building CXX object library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/generator.main.cpp.o
[  6%] Linking CXX executable rocfft-kernel-generator
[  6%] Built target rocfft-kernel-generator
[  8%] Generator producing device kernels for rocfft-device
Scanning dependencies of target rocfft-device
[ 10%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/transpose.cpp.o
[ 13%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/bluestein.cpp.o
[ 17%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/real2complex.cpp.o
[ 17%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/complex2real.cpp.o
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/complex2real.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/real2complex.cpp:21:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/bluestein.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/bluestein.h:26:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2In file included from :/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/transpose.cpp :21:
errorIn file included from : /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/transpose.h:24("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");:
In file included from 
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/complex2real.cpp:23:
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:52:18: error: use of undeclared identifier 'float4'; did you mean 'float'?
struct real_type<float4>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:58:18: error: use of undeclared identifier 'double4'; did you mean 'double'?
struct real_type<double4>
                 ^~~~~~~
                 double                                                                                                                                                                                                                       
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:64:18: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct real_type<float2>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:64:8: error: redefinition of 'real_type<float>'
struct real_type<float2>
       ^~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:52:8: note: previous definition is here
struct real_type<float4>
       ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:70:18: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct real_type<double2>
                 ^~~~~~~
                 double                                                                                                                                                                                                                       
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:70:8: error: redefinition of 'real_type<double>'
struct real_type<double2>
       ^~~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:58:8: note: previous definition is here
struct real_type<double4>
       ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/real2complex.cpp:21:
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:52:18: error: use of undeclared identifier 'float4'; did you mean 'float'?
struct real_type<float4>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:86:21: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct vector4_type<float2>
                    ^~~~~~
                    float                                                                                                                                                                                                                     
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:58:18: error: use of undeclared identifier 'double4'; did you mean 'double'?
struct real_type<double4>
                 ^~~~~~~
                 double                                                                                                                                                                                                                       
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:88:13: error: unknown type name 'float4'; did you mean 'float'?
    typedef float4 type;
            ^~~~~~
            float                                                                                                                                                                                                                             
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:64:18: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct real_type<float2>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:64:8: error: redefinition of 'real_type<float>'
struct real_type<float2>
       ^~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:52:8: note: previous definition is here
struct real_type<float4>
       ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:92:21: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct vector4_type<double2>
                    ^~~~~~~
                    double                                                                                                                                                                                                                    
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:70:18: /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:error94: :13:use of undeclared identifier 'double2'; did you mean 'double'? 
error: unknown type name 'double4'; did you mean 'double'?
struct real_type<double2>
                 ^~~~~~~
    typedef double4 type;
                 double            ^~~~~~~

            double                                                                                                                                                                                                                            
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:70:8: error: redefinition of 'real_type<double>'
struct real_type<double2>
       ^~~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:58:8: note: previous definition is here
struct real_type<double4>
       ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:86:21: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct vector4_type<float2>/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h
:110                    ^~~~~~
:13:                    float                                                                                                                                                                                                                 
error: unknown type name 'float2'; did you mean 'float'?
    typedef float2 type;
            ^~~~~~
            float                                                                                                                                                                                                                             
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:88:13: error: unknown type name 'float4'; did you mean 'float'?
    typedef float4 type;
            ^~~~~~
            float                                                                                                                                                                                                                             
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:116:13: error: unknown type name 'double2'; did you mean 'double'?
    typedef double2 type;
            ^~~~~~~
            double                                                                                                                                                                                                                            
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:92:21: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct vector4_type<double2>
                    ^~~~~~~
                    double                                                                                                                                                                                                                    
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:1: error: unknown type name '__device__'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
           ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:20: error: expected ';' at end of declaration
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                   ^
                   ;                                                                                                                                                                                                                          
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:94:13: error: unknown type name 'double4'; did you mean 'double'?
    typedef double4 type;
            ^~~~~~~
            double                                                                                                                                                                                                                            
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:110:13: error: unknown type name 'float2'; did you mean 'float'?
    typedef float2 type;
            ^~~~~~
            float                                                                                                                                                                                                                             
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:21: error: unknown type name 'lib_make_vector2'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                    ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:55: error: expected ')'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                                      ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:37: note: to match this '('
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                    ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:116:13: error: unknown type name 'double2'; did you mean 'double'?
    typedef double2 type;
            ^~~~~~~
            double                                                                                                                                                                                                                            
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:130:1: error: unknown type name '__device__'
__device__ inline float2 lib_make_vector2(float v0, float v1)
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:129:1: error: extraneous 'template<>' in declaration of variable 'float2'
template <>
^~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:130:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline float2 lib_make_vector2(float v0, float v1)
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:1: error: unknown type name '__device__'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
           ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:20: error: expected ';' at end of declaration
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                   ^
                   ;                                                                                                                                                                                                                          
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:21: error: unknown type name 'lib_make_vector2'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                    ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:55: error: expected ')'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                                      ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:127:37: note: to match this '('
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                    ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:130:1: error: unknown type name '__device__'
__device__ inline float2 lib_make_vector2(float v0, float v1)
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:129:1: error: extraneous 'template<>' in declaration of variable 'float2'
template <>
^~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:130:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline float2 lib_make_vector2(float v0, float v1)
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/bluestein.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/bluestein.h:26:
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:52:18: error: use of undeclared identifier 'float4'; did you mean 'float'?
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/transpose.cpp:21:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/transpose.h:24:
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:52:18:struct real_type<float4> 
                 ^~~~~~error
:                  floatuse of undeclared identifier 'float4'; did you mean 'float'?

struct real_type<float4>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:58:18: error: use of undeclared identifier 'double4'; did you mean 'double'?
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:struct real_type<double4>58
:18                 ^~~~~~~:
                  doubleerror
: use of undeclared identifier 'double4'; did you mean 'double'?
struct real_type<double4>
                 ^~~~~~~
                 double                                                                                                                                                                                                                       
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:64:18: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct real_type<float2>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:64:18: error: use of undeclared identifier 'float2'; did you mean 'float'?
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:64:8: error: struct real_type<float2>
redefinition of 'real_type<float>'                 ^~~~~~

                 float
struct real_type<float2>
       ^~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:52:/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h8::64 :8:note : previous definition is hereerror: 
redefinition of 'real_type<float>'
struct real_type<float4>
       ^struct real_type<float2>

       ^~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:52:8: note: previous definition is here
struct real_type<float4>
       ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:70:18: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct real_type<double2>
                 ^~~~~~~
                 double                                                                                                                                                                                                                       
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h70::708::18 : error: error: redefinition of 'real_type<double>'use of undeclared identifier 'double2'; did you mean 'double'?

struct real_type<double2>
       ^~~~~~~~~~~~~~~~~~
struct real_type<double2>
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h                 ^~~~~~~:
58:8                 double:                                                                                                                                                                                                                  
 note: previous definition is here/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:
70:8: struct real_type<double4>
error       ^: 
redefinition of 'real_type<double>'
struct real_type<double2>
       ^~~~~~~~~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:58:8: note: previous definition is here
struct real_type<double4>
       ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:86:21: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct vector4_type<float2>
                    ^~~~~~
                    float                                                                                                                                                                                                                     
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:86:21: error: use of undeclared identifier 'float2'; did you mean 'float'?
struct vector4_type<float2>
                    ^~~~~~
                    float                                                                                                                                                                                                                     
2 warnings and 20 errors generated.
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:88:13: /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:error88: :13:unknown type name 'float4'; did you mean 'float'? 
error: unknown type name 'float4'; did you mean 'float'?
    typedef float4 type;
    typedef float4 type;
            ^~~~~~
            ^~~~~~
            float
            float                                                                                                                                                                                                                             
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:92:21: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct vector4_type<double2>
                    ^~~~~~~
                    double                                                                                                                                                                                                                    
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:92:21: error: use of undeclared identifier 'double2'; did you mean 'double'?
struct vector4_type<double2>
                    ^~~~~~~
                    double                                                                                                                                                                                                                    
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:94:13: error: unknown type name 'double4'; did you mean 'double'?
    typedef double4 type;
            ^~~~~~~
            double                                                                                                                                                                                                                            
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:94:13: error: unknown type name 'double4'; did you mean 'double'?
    typedef double4 type;
            ^~~~~~~
            double                                                                                                                                                                                                                            
make[2]: *** [library/src/device/CMakeFiles/rocfft-device.dir/build.make:649: library/src/device/CMakeFiles/rocfft-device.dir/complex2real.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h::110110::1313::  errorerror: : unknown type name 'float2'; did you mean 'float'?unknown type name 'float2'; did you mean 'float'?

    typedef float2 type;    typedef float2 type;

            ^~~~~~            ^~~~~~

            float            float                                                                                                                                                                                                            

/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:116:13: error: unknown type name 'double2'; did you mean 'double'?/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h
:116:13: error: unknown type name 'double2'; did you mean 'double'?
    typedef double2 type;
            ^~~~~~~
    typedef double2 type;            double                                                                                                                                                                                                   

            ^~~~~~~
            double
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:1: error: unknown type name '__device__'
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:1__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);:
 ^
error: unknown type name '__device__'
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:12: warning__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);: 
^inline variables are a C++17 extension [-Wc++17-extensions]

/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
           ^
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
           ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h::127127::2020::  errorerror: : expected ';' at end of declarationexpected ';' at end of declaration

__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);

                   ^                   ^

                   ;                   ;                                                                                                                                                                                                      

/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:21: error: unknown type name 'lib_make_vector2'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                    ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h::127127::2155::  errorerror: : unknown type name 'lib_make_vector2'expected ')'

__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);

                                                      ^                    ^

/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:37:/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h :127:note55: : to match this '('
error: expected ')'
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                    ^
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                                      ^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:127:37: note: to match this '('
__device__ inline T lib_make_vector2(real_type_t<T> v0, real_type_t<T> v1);
                                    ^
2 warnings and 20 errors generated.
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:130:1: error: unknown type name '__device__'
__device__ inline float2 lib_make_vector2(float v0, float v1)
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:129:1: error: extraneous 'template<>' in declaration of variable 'float2'
template <>
^~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:130:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:130:1: error__device__ inline float2 lib_make_vector2(float v0, float v1): 
           ^unknown type name '__device__'

fatal error: too many errors emitted, stopping now [-ferror-limit=]
__device__ inline float2 lib_make_vector2(float v0, float v1)
^
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:129:1: error: extraneous 'template<>' in declaration of variable 'float2'
template <>
^~~~~~~~~~~
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:130:12: warning: inline variables are a C++17 extension [-Wc++17-extensions]
__device__ inline float2 lib_make_vector2(float v0, float v1)
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
make[2]: *** [library/src/device/CMakeFiles/rocfft-device.dir/build.make:636: library/src/device/CMakeFiles/rocfft-device.dir/real2complex.cpp.o] Error 1
2 warnings and 20 errors generated.
2 warnings and 20 errors generated.
make[2]: *** [library/src/device/CMakeFiles/rocfft-device.dir/build.make:610: library/src/device/CMakeFiles/rocfft-device.dir/transpose.cpp.o] Error 1
make[2]: *** [library/src/device/CMakeFiles/rocfft-device.dir/build.make:623: library/src/device/CMakeFiles/rocfft-device.dir/bluestein.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: library/src/device/CMakeFiles/rocfft-device.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
@justxi
Copy link
Owner

justxi commented Feb 8, 2020

I don´t know... I think the problem is this one:

#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");

@Lucretia
Copy link
Contributor Author

Lucretia commented Feb 8, 2020

I'm aware that's the issue, which I think leads to #131

@Lucretia
Copy link
Contributor Author

Ok, so forget about #131.

I did the following, for a local build (not via emerge):

export HCC_ROOT=/usr/lib/hcc/3.0
export CXX=${HCC_ROOT}/bin/hcc
export PATH=$PATH:${HCC_ROOT}/bin
export hcc_DIR=${HCC_ROOT}/lib/cmake/

cd build
cmake -Wno-dev -DHIP_PLATFORM=hcc -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_INSTALL_INCLUDEDIR="include/rocFFT/" -DAMDGPU_TARGETS=gfx701 ../
make -j3 VERBOSE=1

and I get the following:

/usr/bin/cmake -S/home/laguest/src/mine-new/rocm-local-copy/rocFFT -B/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/CMakeFiles /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
make -f library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/build.make library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/depend
make[2]: Entering directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/laguest/src/mine-new/rocm-local-copy/rocFFT /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/DependInfo.cmake --color=
Dependee "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/DependInfo.cmake" is newer than depender "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/depend.internal".
Dependee "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/depend.internal".
Scanning dependencies of target rocfft-kernel-generator
make[2]: Leaving directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
make -f library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/build.make library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/build
make[2]: Entering directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
[  2%] Building CXX object library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/generator.main.cpp.o
[  5%] Building CXX object library/src/device/generator/CMakeFiles/rocfft-kernel-generator.dir/generator.file.cpp.o
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator && /usr/lib/hcc/3.0/bin/hcc   -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator/../../include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/include  -O3 -DNDEBUG   -std=c++11 -o CMakeFiles/rocfft-kernel-generator.dir/generator.main.cpp.o -c /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator/generator.main.cpp
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator && /usr/lib/hcc/3.0/bin/hcc   -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator/../../include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/include  -O3 -DNDEBUG   -std=c++11 -o CMakeFiles/rocfft-kernel-generator.dir/generator.file.cpp.o -c /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator/generator.file.cpp
[  7%] Linking CXX executable rocfft-kernel-generator
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/generator && /usr/bin/cmake -E cmake_link_script CMakeFiles/rocfft-kernel-generator.dir/link.txt --verbose=1
/usr/lib/hcc/3.0/bin/hcc  -O3 -DNDEBUG   CMakeFiles/rocfft-kernel-generator.dir/generator.main.cpp.o CMakeFiles/rocfft-kernel-generator.dir/generator.file.cpp.o  -o rocfft-kernel-generator 
make[2]: Leaving directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
[  7%] Built target rocfft-kernel-generator
make -f library/src/device/CMakeFiles/rocfft-device.dir/build.make library/src/device/CMakeFiles/rocfft-device.dir/depend
make[2]: Entering directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
[ 10%] Generator producing device kernels for rocfft-device
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device && generator/rocfft-kernel-generator all 8
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/laguest/src/mine-new/rocm-local-copy/rocFFT /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/CMakeFiles/rocfft-device.dir/DependInfo.cmake --color=
Dependee "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/CMakeFiles/rocfft-device.dir/DependInfo.cmake" is newer than depender "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/CMakeFiles/rocfft-device.dir/depend.internal".
Dependee "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device/CMakeFiles/rocfft-device.dir/depend.internal".
Scanning dependencies of target rocfft-device
make[2]: Leaving directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
make -f library/src/device/CMakeFiles/rocfft-device.dir/build.make library/src/device/CMakeFiles/rocfft-device.dir/build
make[2]: Entering directory '/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build'
[ 13%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/transpose.cpp.o
[ 15%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/bluestein.cpp.o
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device && /usr/lib/hcc/3.0/bin/hcc  -Drocfft_device_EXPORTS -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/../include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/include -isystem /usr/lib/hip/include  -O3 -DNDEBUG -fPIC   -fno-gpu-rdc -Wno-unused-command-line-argument -std=c++14 -o CMakeFiles/rocfft-device.dir/transpose.cpp.o -c /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/transpose.cpp
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device && /usr/lib/hcc/3.0/bin/hcc  -Drocfft_device_EXPORTS -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/../include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/include -isystem /usr/lib/hip/include  -O3 -DNDEBUG -fPIC   -fno-gpu-rdc -Wno-unused-command-line-argument -std=c++14 -o CMakeFiles/rocfft-device.dir/bluestein.cpp.o -c /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/bluestein.cpp
[ 18%] Building CXX object library/src/device/CMakeFiles/rocfft-device.dir/real2complex.cpp.o
cd /home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device && /usr/lib/hcc/3.0/bin/hcc  -Drocfft_device_EXPORTS -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/../include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/generator -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/library/src/device -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/include -I/home/laguest/src/mine-new/rocm-local-copy/rocFFT/build/include -isystem /usr/lib/hip/include  -O3 -DNDEBUG -fPIC   -fno-gpu-rdc -Wno-unused-command-line-argument -std=c++14 -o CMakeFiles/rocfft-device.dir/real2complex.cpp.o -c /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/real2complex.cpp
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/bluestein.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/bluestein.h:26:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/transpose.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/transpose.h:26:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/real2complex.cpp:21:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/./kernels/common.h:8:
/usr/lib/hip/include/hip/hip_vector_types.h:38:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
 ^
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/transpose.cpp:23:
In file included from /home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/transpose.h:26:
/home/laguest/src/mine-new/rocm-local-copy/rocFFT/library/src/device/kernels/common.h:52:18: error: use of undeclared identifier 'float4'; did you mean 'float'?
struct real_type<float4>
                 ^~~~~~
                 float                                                                                                                                                                                                                        
...etc

On checking hipconfig:

HIP version  : 3.0.20056-

== hipconfig
HIP_PATH     : /usr/lib/hip
HIP_PLATFORM : hcc
CPP_CONFIG   :  -D__HIP_PLATFORM_HCC__=   -I/usr/lib/hip/include -I/usr/lib/hcc/3.0/include -I/usr/include

== hcc
HSA_PATH     : /usr
HCC_HOME     : /usr/lib/hcc/3.0
HCC clang version 10.0.0 (/var/tmp/portage/sys-devel/hcc-3.0.0/work/hcc-3.0.0/llvm-project/clang 40756364719e83a2ddd5abe0affe700723cdd852) (based on HCC 3.0.19502-286651a0-40756364719 )
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/hcc/3.0/bin
LLVM (http://llvm.org/):
  LLVM version 10.0.0svn
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: bdver2

  Registered Targets:
    amdgcn - AMD GCN GPUs
    r600   - AMD GPUs HD2XXX-HD6XXX
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64
HCC-cxxflags :  -hc -std=c++amp -I/usr/lib/hcc/3.0/includeHCC-ldflags  :  -hc -std=c++amp -L/usr/lib/hcc/3.0/lib -Wl,--rpath=/usr/lib/hcc/3.0/lib -ldl -lm -lpthread -lhc_am -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive

=== Environment Variables
PATH=/home/laguest/.sdkman/candidates/kotlin/current/bin:/usr/lib/llvm/9/bin:/usr/lib/llvm/8/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/lib/hip/bin:/home/laguest/.rvm/bin:/home/laguest/opt/VSCode-linux-x64/bin:/home/laguest/.go/bin:/usr/lib/hcc/3.0/bin
HCC_HOME=/usr/lib/hcc/3.0
HSA_PATH=/usr
HCC_ROOT=/usr/lib/hcc/3.0
HIP_PATH=/usr/lib/hip
HIP_PLATFORM=hcc
HIP_CLANG_PATH=/usr/lib/llvm/roc/bin
HIP_COMPILER=clang

== Linux Kernel
Hostname     : rogue
Linux rogue 5.6.0-rc1 #1 SMP PREEMPT Wed Feb 12 18:24:56 GMT 2020 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
LSB Version:    n/a
Distributor ID: Gentoo
Description:    Gentoo Base System release 2.7
Release:        2.7
Codename:       n/a

and doing hcc -x c /dev/null -dM -E|grep -i hip gives me no __HIP_PLATFORM_HCC__ macro.

I have add gfx701 to the CMakeLists.txt targets.

@justxi
Copy link
Owner

justxi commented Feb 15, 2020

Ok, I currently added only "gfx803", "gfx900" and "gfx906", so you can add "gfx701" to the ebuilds.

@Lucretia
Copy link
Contributor Author

Ok, I currently added only "gfx803", "gfx900" and "gfx906", so you can add "gfx701" to the ebuilds.

Maybe, if I can get the thing to build, which I can't; either as above or using the ebuild, no matter the target isa.

@justxi
Copy link
Owner

justxi commented Feb 15, 2020

How did you build HIP with "hcc-backend" or "llvm-roc-backend"?

@Lucretia
Copy link
Contributor Author

I have a set for rocm:

# cat /etc/portage/sets/rocm 
dev-libs/rocm-comgr
dev-libs/rocm-device-libs
dev-libs/rocm-opencl-runtime
dev-libs/rocr-runtime
dev-libs/roct-thunk-interface
dev-util/rocm-clang-ocl
dev-util/rocm-cmake
dev-util/rocm-smi
dev-util/rocminfo
sys-devel/llvm-roc
sys-devel/hip
sys-devel/hcc

Then:

# emerge -pv @rocm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-util/rocm-cmake-3.0.0::gentoo  14 KiB
[ebuild   R    ] dev-libs/roct-thunk-interface-3.0.0:0/3.0::gentoo  2,623 KiB
[ebuild   R    ] dev-libs/rocr-runtime-3.0.0:0/3.0::gentoo  USE="-nonfree" 321 KiB
[ebuild   R    ] sys-devel/llvm-roc-3.0.0::gentoo  USE="-debug" 114,613 KiB
[ebuild   R    ] dev-util/rocminfo-3.0.0-r1:0/3.0::rocm  15 KiB
[ebuild   R    ] dev-util/rocm-smi-3.0.0::rocm  42 KiB
[ebuild   R    ] dev-libs/rocm-device-libs-3.0.0:0/3.0::gentoo  223 KiB
[ebuild   R    ] sys-devel/hcc-3.0.0:0/3.0::rocm  USE="-debug" 0 KiB
[ebuild   R    ] dev-libs/rocm-comgr-3.0.0:0/3.0::gentoo  87 KiB
[ebuild   R    ] dev-libs/rocm-opencl-runtime-3.0.0:0/3.0::gentoo  1,014 KiB
[ebuild   R    ] sys-devel/hip-3.0.0:0/3.0::rocm  USE="hipify llvm-roc-backend -debug -hcc-backend" 879 KiB
[ebuild   R    ] dev-util/rocm-clang-ocl-3.0.0::rocm  3 KiB

Total: 12 packages (12 reinstalls), Size of downloads: 119,830 KiB

You can see the use flags here.

@Lucretia
Copy link
Contributor Author

And, yes, I'm trying the the roc backend, as I stated in a previous issue, because 1) it needs testing and 2) hcc is deprecated.

@justxi
Copy link
Owner

justxi commented Feb 15, 2020

Ok, with "hcc-backend" I had no problems merging rocFFT.
But I didn´t had the time to test it with "llvm-roc-backend".

@Lucretia
Copy link
Contributor Author

Ok, with "hcc-backend" I had no problems merging rocFFT.
But I didn´t had the time to test it with "llvm-roc-backend".

Ok, but is there anything you can think of going by what I've pasted here? I've checked the hipcc script which has the __HIP_PLATFORM_HCC__ macro defined in it as I've pointed out above from the output of hipconfig. I'm at a loss as to what to look at.

@justxi
Copy link
Owner

justxi commented Feb 15, 2020

I compared your hipconfig output with mine and except some env vars it is the same. Maybe ask / create an issue about that at ROCm/HIP?

@justxi
Copy link
Owner

justxi commented May 12, 2020

Do yo find a solution?

@Lucretia
Copy link
Contributor Author

Lucretia commented May 12, 2020

Nope. Not touched in ages due to bugs that AMD refuse to look into because I was trying to build for an "unsupported" target. It'd be nice if you tried to build it

@justxi
Copy link
Owner

justxi commented Jun 27, 2020

I currently have only limited time and focus on ROCm 3.5.x.
Please reopen if you have new informations.

@justxi justxi closed this as completed Jun 27, 2020
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