-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Implement Indirect Function hsa_executable_symbol_t and Its Info Query #176
Comments
In the HSA HSAIL spec there was the addition of indirect functions. These were never implemented so this support was never used. One of the things likely needed for this is a standard ABI for heterogeneous function pointers. For numerous reasons AMD GPU does not have a standard function ABI yet. Interested in what you are looking to do with this? |
H Matin, we need more detailed justification of potential usage for requested features. |
@t-tye @TimourPaltashev Thank you for the response. We want to use this in our binary instrumentation framework (called Luthier) for the following use cases:
To locate a single (or all) symbols in an executable, we have to pay additional lookup penalties, to ensure we cover the indirect functions. Having HSA implementing this feature will remove this penalty.
This workaround is doable on our end, but puts additional burden on Luthier, for something that seems more fit to be implemented in HSA. I understand that, from the host side, there's little need for the runtime to know about the indirect function. But our use case relies heavily on them being identified as quickly as possible, and exposed to the end user. |
Currently symbols are put into the dynsym table for kernel descriptors and the entry point of the kernel. The latter is not required in the symbol table as the language runtime only requires the kernel descriptors. A future compiler may stop putting the kernel entry point in the symbol table. The HSA Runtime only returns the kernel descriptor symbols. There are no indirect functions being generated by the compiler. The ABI for the kernel descriptor is specified at https://llvm.org/docs/AMDGPUUsage.html#kernel-descriptor . If you require the entry point of the kernel you can use the signed KERNEL_CODE_ENTRY_BYTE_OFFSET relative to the base address of the kernel descriptor. Be aware that some targets support preloaded kernel arguments which results in there being 2 entry points to the kernel. See https://llvm.org/docs/AMDGPUUsage.html#preloaded-kernel-arguments . |
I'm closing this in favor of #203. |
In the ROCr Documentation, features related to creating an indirect function symbol and querying its information is not implemented.
Are there any plans to implement them? If not what are the issues that blocks this?
The text was updated successfully, but these errors were encountered: