GithubHelp home page GithubHelp logo

Comments (6)

yxsamliu avatar yxsamliu commented on August 11, 2024

what command did you use to compile and link the program?

from hip.

mariodirenzo avatar mariodirenzo commented on August 11, 2024

The objects are compiled with lines (generated by Make) like

clang++ -DUSE_HDF -DUSE_HIP -D__HIP_PLATFORM_AMD__ -D__HIP_ROCclr__=1  [VARIOUS INCLUDE FOLDERS] -fgpu-rdc -O3 -Wall --offload-arch=gfx90a -fopenmp=libomp -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false -std=gnu++17 -o   fft.cc.o -x hip -c fft.cc

The objects are collected into libraries with lines like

llvm-ar qc libprometeoSolver.a [OBJECT NAMES]

The program is linked with

hipcc_cmake_linker_helper /usr/bin -fgpu-rdc -O3 -Wall --offload-arch=gfx90a -Wl,--export-dynamic main.cc.o -o prometeo.exec   [ALL LIBRARIES]

from hip.

yxsamliu avatar yxsamliu commented on August 11, 2024

for a simple program like

#inclue "hip/hip_runtime.h"
__global__ void run_printf() { printf("Hello World\n"); }
int main() {
  run_printf<<<1,1>>>();
  hipDeviceSynchronize();
}

If you compile it directly with /opt/rocm/llvm/bin/clang++ --hip-link -O3 --offload-arch=gfx90a . Does it work?

from hip.

mariodirenzo avatar mariodirenzo commented on August 11, 2024

yes, it does

from hip.

yxsamliu avatar yxsamliu commented on August 11, 2024

it could be due to some compiler bug about archive handling, which have been fixed in latest ROCm.

from hip.

mariodirenzo avatar mariodirenzo commented on August 11, 2024

You are right. The problem goes away after switching to rocm 6.0.2.
Thanks for your help

from hip.

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.