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
Este cometimento está contido em:
cometido por
Juan MartinezFernandez
ascendente
6a0f80a03d
cometimento
f3dc04a50d
@@ -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,
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador