This website requires JavaScript.
Explore
Help
Sign In
AI
/
rocm-systems
Watch
2
Star
0
Fork
0
You've already forked rocm-systems
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
2,105
Commits
3
Branches
0
Tags
1824fb76985d1a4b172914501617fe34bc12df2d
Commit Graph
3 Commits
Author
SHA1
Message
Date
Alex Voicu
1824fb7698
Clean-up some remaining noise in program_state.cpp.
2017-11-20 22:41:46 +00:00
Alex Voicu
2cacda91bb
Correctly deal with functions from shared objects, wherein the program visible VA == so_base_va + st_value(function_symbol). Remove quaint usage of pfe for hipMemset (which is actually fill_n).
2017-11-01 22:33:13 +00:00
Alex Voicu
c2482d1255
This switches HIP from its currently convoluted macro + pfe based dispatch mechanism to a more natural one partially based on the existing module API. The basic idea is that HCC will always correctly emit __global__ functions: as empty-bodied stubs, on host, and as kernels, on device. It then becomes trivial to obtain the mangled name on host, at dispatch, from the function's address, and then to use the mangled name to retrieve the kernel. This should address all problems stemming from serialisation, dubious mismatches due to the manufactured functor, macro-isms et al. It also immediately enables support for generalised globals as a consequence of that being available in the module API. Finally, it will make debug much easier, since the actual names of the __global__ functions will automatically be used in traces etc. One detail is that due to how dispatch works now (hipLaunchKernel and hipLaunchKernelGGL are themselves variadic function templates which deduce the function type of the callee), in certain cases it may be necesssary to insert explicit casts to ensure that the variadic argument list selects a viable overload - this can be observed in some unit tests. Eventually we may be able to remove this limitation, but for now it does not appear terribly onerous. The code is not extremely HIPpie, nor is it fully optimised, but rather is intended as a starting point for the HIP team to make its own.
2017-11-01 15:09:59 +00:00