Giter Club home page Giter Club logo

Comments (14)

bragadeesh avatar bragadeesh commented on July 26, 2024

What branch are you building? Did this succeed before or are you building for the first time with rocm 1.7.0?
We have had some build fails today, but it looks your error message is something else

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

This is on the develop branch of rocFFT, which seems to be the default branch. This is a first-time build for me. I initially followed the build instructions on the wiki under "Build Library + Tests + Benchmarks + Samples Using Individual Commands". That succeeded, but then when I wanted to run the benchmarks, as per the wiki instructions under "Clients", rocfft-rider was not available in the build directory. That's why I next tried building using install.sh, with the -c option, hoping that this would give me the client binaries too.

from rocfft.

kknox avatar kknox commented on July 26, 2024

Try it today; you may have just cloned the repo just as we made a checkin that broke the build. I think i fixed it in #113, so give it another shot. Its passing now in our CI. Use the install -cd command and let me know how it goes.

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

I'm getting the same error during the building of the clients when doing install -cd:
/opt/rocm/hip/include/hip/hip_runtime_api.h:276: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__");

This is on the development branch, commit 0f8cd3, pulled today:

commit 0f8cd3384cd0a566c4a0821f9a0b4103097dc2a3
Merge: 7e94e50 2eab715
Author: Bragadeesh Natarajan <[email protected]>
Date:   Tue Jan 30 14:36:37 2018 -0800

    Merge pull request #113 from kknox/build-fix
    
    Fixing include paths for cmake targets

from rocfft.

bragadeesh avatar bragadeesh commented on July 26, 2024

If you run: /opt/rocm/bin/hipconfig
what does it show?

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

I'll answer that below. I'm on to something: when I run the install.sh script, build/release/compile_commands.json has a lot of matches for __HIP_PLATFORM_NVCC__, while I am on an AMD system (the only gpu is a Fiji). For instance:

{
  "directory": "/home/rvanoo/repos/rocFFT/build/release/clients/samples/fixed-16",
  "command": "/opt/rocm/bin/hcc  -D__HIP_PLATFORM_NVCC__ -I/home/rvanoo/repos/rocFFT/clients/samples/fixed-16/../include -I/opt/rocm/hip/include -I/home/rvanoo/repos/rocFFT/library/include/rocfft -I/home/rvanoo/repos/rocFFT/build/release/include/rocfft -I/home/rvanoo/repos/rocFFT/library/include -I/home/rvanoo/repos/rocFFT/build/release/include  -O3 -DNDEBUG   -Wno-unused-command-line-argument -std=c++11 -o CMakeFiles/fixed-16-float.dir/fixed-16-float.cpp.o -c /home/rvanoo/repos/rocFFT/clients/samples/fixed-16/fixed-16-float.cpp",
  "file": "/home/rvanoo/repos/rocFFT/clients/samples/fixed-16/fixed-16-float.cpp"
},

When I manually build rocFFT (i.e., mkdir -p build/release, cd build/release, cmake ../..), these do not appear in compile_commands.json.

While this system has only an AMD GPU, it does have a CUDA installation too (needed for unrelated HIP work). Perhaps this tricks the install.sh script into thinking it runs on an NVIDIA system. This was an issue with older versions of hipcc too.

/opt/rocm/bin/hipconfig gives me this:

HIP version  : 1.4.17494

== hipconfig
HIP_PATH     : /opt/rocm
HIP_PLATFORM : hcc
CPP_CONFIG   :  -D__HIP_PLATFORM_HCC__=   -I/opt/rocm/include -I/opt/rocm/hcc/include

== hcc
HSA_PATH     : /opt/rocm/hsa
HCC_HOME     : /opt/rocm/hcc
HCC clang version 6.0.0 (ssh://gerritgit/compute/ec/hcc-tot/clang 42ceed861a212d9bd0aef883ee7981144f3ecc02) (ssh://gerritgit/compute/ec/hcc-tot/llvm 23e086be6f627e6e983c6789d2e77da6bf85ebb6) (based on HCC 1.1.17493-2f85d8a-42ceed8-23e086b )
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/hcc/bin
Can't exec "/opt/rocm/hcc/compiler/bin/llc": No such file or directory at /opt/rocm/bin/hipconfig line 132.
HCC-cxxflags :  -hc -std=c++amp -I/opt/rocm/hcc-1.0/include -I/opt/rocm/includeHCC-ldflags  :  -hc -std=c++amp -L/opt/rocm/hcc-1.0/lib -Wl,--rpath=/opt/rocm/hcc-1.0/lib -ldl -lm -lpthread -lunwind -lhc_am -Wl,--whole-archive -lmcwamp -Wl,--no-whole-archive

=== Environment Variables
PATH=/home/rvanoo/bin:/home/rvanoo/.local/bin:/home/rvanoo/bin:/home/rvanoo/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/rocm/bin:/opt/rocm/bin
HIP_PLATFORM=hcc

== Linux Kernel
Hostname     : snell
Linux snell 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

from rocfft.

bragadeesh avatar bragadeesh commented on July 26, 2024

ok, looks like that cuda presence is the problem, it confuses the build system to use hipcc instead of hcc

from rocfft.

bragadeesh avatar bragadeesh commented on July 26, 2024

@kknox how do we prevent this?
also it might help to get -v switch to the install script to enable VERBOSE output and we can ask user to post build log when they have build problem

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

In the meanwhile, I managed to build/install rocFFT manually, as I described above, and I also built rocfft-rider. But when I run the example from the wiki, I get an error:

[rvanoo@snell:~/repos/rocFFT/build/release/clients/staging] $ ./rocfft-rider -x 1024 -b 1000 -p 100
HIP_V_THROWERROR< 1030 > (/home/rvanoo/repos/rocFFT/clients/rider/misc.cpp Line: 20): hipMalloc failed
rocfft error condition reported:
HIP_V_THROWERROR< 1030 > (/home/rvanoo/repos/rocFFT/clients/rider/misc.cpp Line: 20): hipMalloc failed

I have other HIP codes on this machine that also use hipMalloc (of course), and these work just fine. Any idea? I'll make a debug build, and see if I can find out what is going on.

from rocfft.

bragadeesh avatar bragadeesh commented on July 26, 2024

are there other GPU apps running? Fiji should have enough device memory to run those cases, not sure why it cannot find memory.

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

I just discovered that I did not correctly built rocfft-rider: did not speficy hcc to be used as the compiler. The standard C++ compiler was used instead, so I guess no HIP libs were linked (although I didn't get any linking errors).

When I do specify hcc to be used, I'm back to the old compilation errors about __HIP_PLATFORM_NVCC__. Is there any cmake argument that forces an AMD build instead of an NVIDIA build? Currently looking at clients\rider\CMakeLists.txt to see if I can make any changes there to force an AMD build.

from rocfft.

kknox avatar kknox commented on July 26, 2024

Yes, I think you are correct. The cmake code uses the presence of CUDA to determine if it should compile for a CUDA backend

I think i need to add a new configure flag to allow a user to pick the backend they want, instead of making assumptions. If you can, try to uninstall the CUDA SDK. Also, If you are familiar with docker, you could build rocfft in a clean rocm docker container.

from rocfft.

rwvo avatar rwvo commented on July 26, 2024

I just commented out the if( CUDA_FOUND ) branch in the CMakeLists.txt for rocfft-rider, and this got me a working version. The docker solution would be cleaner, pending the new config flag, but I'm not super-familiar with that, so I'll go with the dirty workaround for now.

Thanks for the quick help to both of you.

from rocfft.

kknox avatar kknox commented on July 26, 2024

OK, that's clever and I'm glad you are up and going. In the future, if you need to rebuild, you could probably just comment out this line, and that would force CUDA_FOUND to be uninitialized and therefore evaluate to false.

from rocfft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.