Skip to content

Conversation

@traversaro
Copy link

Motivation

When the ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW variable is specified, the install location of bytecode changes, but this change is not reflected in the AMDDeviceLibsConfig.cmake file, that still points to the default install location. This PR fixes this by respecting the ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW when generating the AMDDeviceLibsConfig.cmake file.

Technical Details

The Packages.cmake was redefining a install_path_suffix variable with the hardcoded install value, but a similar variable INSTALL_ROOT_SUFFIX (that respects ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW was already defined in OCL.cmake, so as OCL is included before Packages, we can just get rid of install_path_suffix and use INSTALL_ROOT_SUFFIX .

This removes the need for patches or workarounds used in downstream packaging, see:

Test Plan

I configured the amd/device-libs folder in standalone mode, and specified a custom install location with ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW, and I verified manually that AMDDeviceLibsConfig.cmake was correctly updated.

Test Result

See Test Plan.

Submission Checklist

@lamb-j lamb-j added the External Issue reported by community user label Oct 13, 2025
@skganesan008
Copy link
Collaborator

Github action triggered jenkins job: https://compiler-ci.amd.com/job/compiler-upstream-rocm-llvm-project-psdb/131

@skganesan008
Copy link
Collaborator

Github action triggered jenkins job: https://compiler-ci.amd.com/job/compiler-upstream-rocm-llvm-project-psdb/132

@skganesan008
Copy link
Collaborator

Please ignore the PSDB verification trigger. IWe are enabling PSDB for amd-staging PR's starting Oct 20. I was checking if the triggers are happening as expected on non test PR's . Sorry if this had interrupted you.

@skganesan008
Copy link
Collaborator

@skganesan008
Copy link
Collaborator

There seems to be a compilation error in the latest build. We have deployed the PSDB automation today. Please check the compilation error.

@traversaro
Copy link
Author

There seems to be a compilation error in the latest build. We have deployed the PSDB automation today. Please check the compilation error.

Hello @skganesan008 , thanks for the feedback. The log seems at https://compiler-ci.amd.com/job/compiler-psdb-amd-staging/2354, is this accessible from outside AMD?

@lamb-j
Copy link
Collaborator

lamb-j commented Oct 22, 2025

@traversaro not yet publicly accessible, that's a work in progress though

The failure doesn't seem related to your change though:

[2025-10-21T16:45:02.922Z] /jenkins/workspace/compiler-psdb-amd-staging/repos/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/LLVMToSPIRVDbgTran.cpp:591:31: error: request for member ‘getUnversionedName’ in ‘CU->llvm::DICompileUnit::getSourceLanguage()’, which is of non-class type ‘unsigned int’

Can you rebase on top of the latest amd-staging? That may fix it

@traversaro
Copy link
Author

traversaro commented Oct 22, 2025

Can you rebase on top of the latest amd-staging? That may fix it

Done!

@skganesan008
Copy link
Collaborator

Copy link
Collaborator

@lamb-j lamb-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, good catch

We're already setting INSTALL_ROOT_SUFFIX to amdgcn/bitcode here (as you mentioned):

set (INSTALL_ROOT_SUFFIX "amdgcn/bitcode")

@lamb-j lamb-j merged commit 9583ee3 into ROCm:amd-staging Oct 24, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Issue reported by community user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants