HIP
HIP copied to clipboard
call to hipModuleGetFunction fails unexpectedly...need to understand why
I am trying to debug a failure in a TF XLA unit test, that fails because a call to the hipModuleGetFunction API returns error.
I can replicate the error using a small testcase, which simply does a hipModuleLoad (on the .hsaco file generated by the TF XLA unit test), followed by a hipModuleGetFunction (for gather_4). When I look at the llvm-objdump output of the .hsaco file, the function is present, so I do not know why the call to hipModuleGetFunction is failing.
I have attached a tarball containing all the files required to reproduce this error.
cd kernel_not_found
make
./loadKernel.hip.out
I see you are not using --genco to generate code object . hipModuleGetFunction works as shown https://github.com/ROCm-Developer-Tools/HIP/blob/master/samples/0_Intro/module_api/runKernel.cpp#L67
and https://github.com/ROCm-Developer-Tools/HIP/blob/master/samples/0_Intro/module_api_global/runKernel.cpp#L99
My testcase is based on the example you have shown.
When I use .hsaco files generated from "passing" XLA testcases, the same code is working fine (i.e. the call to hipModuleGetFunction succeeds)..I suspect there is something wrong / peculair about the .hsaco file (provided in the tarball) that is causing the error, and I need to figure out what that is.
Can you please shed more light on why the call to hipModuleGetFunction fails, even though the function is seemingly present in the .hsaco file)?
Thanks
deven
@deven-amd Apologies for the lack of response. Do you still require assistance with this ticket? Thanks!
@deven-amd Closing issue as it's too old. Please re-open if it's still an issue. Thanks!