SWDEV-410182: Link device-libs when compiling source to bitcode
This is related to SWDEV-410182, but it's not enough to fix it.
Functions from device-libs are precompiled into llvm-ir in a "target agnostic" way
(in reality, it's not 100% target agnostic, which brings us many headaches).
When linking builtins (like device-libs) from the command line, we use the flag
-mlink-builtin-bitcode. The difference between regular linking of bitcode and
this flag is that the later propagates target-specific attributes. If this
attributes are not propagated, we can end up with incosistent target attributes.
Comgr provides the action AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC
for this exact reason. The old action is currently deprecated and this one should
be used.
Change-Id: I518415214debdf4fedf0b1d81456d6e9fb8a3d19
[ROCm/clr commit: f3dc04a50d]
这个提交包含在:
提交者
Juan MartinezFernandez
父节点
76cc68ff80
当前提交
58e62063f3
@@ -457,8 +457,7 @@ class Program : public amd::HeapObject {
|
||||
bool linkLLVMBitcode(const amd_comgr_data_set_t inputs,
|
||||
const std::vector<std::string>& options,
|
||||
amd::option::Options* amdOptions, amd_comgr_data_set_t* output,
|
||||
char* binaryData[] = nullptr, size_t* binarySize = nullptr,
|
||||
const bool link_dev_libs = true);
|
||||
char* binaryData[] = nullptr, size_t* binarySize = nullptr);
|
||||
|
||||
//! Create the bitcode of the compiled input dataset
|
||||
bool compileToLLVMBitcode(const amd_comgr_data_set_t compileInputs,
|
||||
|
||||
在新工单中引用
屏蔽一个用户