HIP icon indicating copy to clipboard operation
HIP copied to clipboard

call to hipModuleGetFunction fails unexpectedly...need to understand why

Open deven-amd opened this issue 6 years ago • 3 comments

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

kernel_not_found.tar.gz

deven-amd avatar May 01 '19 16:05 deven-amd

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

gargrahul avatar May 01 '19 18:05 gargrahul

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 avatar May 01 '19 18:05 deven-amd

@deven-amd Apologies for the lack of response. Do you still require assistance with this ticket? Thanks!

ppanchad-amd avatar Apr 30 '24 14:04 ppanchad-amd

@deven-amd Closing issue as it's too old. Please re-open if it's still an issue. Thanks!

ppanchad-amd avatar May 28 '24 17:05 ppanchad-amd