GithubHelp home page GithubHelp logo

Comments (7)

cjatin avatar cjatin commented on August 11, 2024

3.x is now almost 4 year old release.

Can you upgrade it to 5.6+ and check.

Also can you provide a bit more data here like: your gpu name/architecture, a sample code that reproduces this issue, compiler command you used to compile.

from hip.

yulingao avatar yulingao commented on August 11, 2024

3.x is now almost 4 year old release.

Can you upgrade it to 5.6+ and check.

Also can you provide a bit more data here like: your gpu name/architecture, a sample code that reproduces this issue, compiler command you used to compile.

Sorry, only version 3.3 and 2.9 are available on the hpc I'm using.

If I comment out hip_impl::hip_init() in the hipLaunchKernelGGL of functional_grid_launch.hpp, then ps.get_kernargs_size_align(reinterpret_caststd::uintptr_t(kernel)) in make_kernarg() will report an error. If I don't comment it out, everything is fine. But now, I have to comment it out.

template<typename... Args, typename F = void (*)(Args...)>
inline void hipLaunchKernelGGL(F kernel, const dim3 &numBlocks, const dim3 &dimBlocks, std::uint32_t sharedMemBytes, hipStream_t stream,
Args... args) {
// hip_impl::hip_init();
auto kernarg = hip_impl::make_kernarg(kernel, std::tuple<Args...>{std::move(args)...});
std::size_t kernarg_size = kernarg.size();
...
}

After my analysis, the problem is in the read_kernarg_metadata() in program_state.inl. In my opinion, hip_init should be unnecessary to read the arguments to the kernel function. But In hip 2.9, things work well when commenting out the hip_init(). Can you help me to analyse why the above happens.

from hip.

cjatin avatar cjatin commented on August 11, 2024

in 3.x hip_impl::hip_init() was internal hip init (not to be confused with hipInit()). It is required before you query kernel arguments because it initializes visible devices which is required by program_state.
You can not comment that line out, it is required.

from hip.

yulingao avatar yulingao commented on August 11, 2024

in 3.x hip_impl::hip_init() was internal hip init (not to be confused with hipInit()). It is required before you query kernel arguments because it initializes visible devices which is required by program_state. You can not comment that line out, it is required.

Well, that's a real pity. I wanna be able to run get_kernargs_size_align without calling hipimpl::hip_init(). Looks like there's no way to implement my features.

from hip.

b-sumner avatar b-sumner commented on August 11, 2024

Hi @yulingao can you comment on your features? kernarg is not a concept of HIP, its an implementation detail. So it's hard to understand why you care about kernarg if you are writing HIP programs.

from hip.

yulingao avatar yulingao commented on August 11, 2024

@b-sumner Apologize for the delay in my response. What I would like to do is intercept the hiplaunchkernelGGL function in order to achieve remote execution of the HIP program.

from hip.

b-sumner avatar b-sumner commented on August 11, 2024

Hi @yulingao thanks for the information. I can think of a few ways to do that, but only with some pretty significant restrictions. For example, many HIP (and Cuda) programs allow device functions to directly access host memory or the memory of other GPUs. Are your applications of interest not using such features?

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.