Closed stuartarchibald closed 1 year ago
Are the actions you mention the only ones performed? The AMD_COMGR_ACTION_ASSEMBLE_SOURCE_TO_RELOCATABLE
action operates on ISA-level assembly text (e.g. .S files) not on LLVM IR/BC. This is related to #7; "source" is not very well defined in the documentation, but it does not include LLVM IR.
If you are trying to create a relocatable from LLVM BC sources, you will want to use AMD_COMGR_ACTION_CODEGEN_BC_TO_RELOCATABLE
.
Should be fixed by updating Comgr actions used. Let me know if you still have any issues with this!
Following on from: #4
I am trying to do the following:
Create a dataset with a single LLVM IR source and 9 bitcode sources:
Bitcodes are from the ROCm 1.9.x release:
AMD_COMGR_ACTION_ASSEMBLE_SOURCE_TO_RELOCATABLE
on the datasetAMD_COMGR_ACTION_LINK_RELOCATABLE_TO_RELOCATABLE
on the resulting datasetPerform an action kind of
AMD_COMGR_ACTION_LINK_RELOCATABLE_TO_EXECUTABLE
on the resulting dataset. At which point there's loads of errors like:I'm guessing the error is because of the baked in
-r
in thelld
binding there's no way to-shared
. Also can't find a way to add-fPIC
(which was a bit what this was about https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/5, in that I'm trying to relate thecomgr
behaviours and source back to a familiar implementation)?Thanks.