This is an archive of the discontinued LLVM Phabricator instance.

[HIP] use GetProgramPath for executable discovery
ClosedPublic

Authored by DieGoldeneEnte on Jan 17 2020, 12:51 AM.

Details

Summary

This change replaces the manual building of executable paths using llvm::sys::path::append with GetProgramPath. This enables adding other paths in case executables reside in different directories and makes the code easier to read.

This was previously part of D72806, but was split up for easier review.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2020, 12:51 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tra accepted this revision.Jan 17 2020, 12:05 PM
This revision is now accepted and ready to land.Jan 17 2020, 12:05 PM

If @yaxunl has no objections, could someone merge this as I don't have commit access?
Also do we want to also apply this to older versions, since the change is trivial? I confirmed the same problem is in clang 8, 9 and 10 and am certain it is in clang 7, although I didn't test it, because I don't have appropriate device-libs at hand.

This revision was automatically updated to reflect the committed changes.
tra added a subscriber: hans.Jan 21 2020, 9:55 AM

I've landed the change. As for backporting, I'll leave it up to AMD folks. If @yaxunl and the team deem it appropriate, they should talk to @hans about cherry-picking the change into particular releases.

hans added a comment.Jan 21 2020, 10:02 AM
In D72903#1831716, @tra wrote:

I've landed the change. As for backporting, I'll leave it up to AMD folks. If @yaxunl and the team deem it appropriate, they should talk to @hans about cherry-picking the change into particular releases.

Let me know if you'd like me to cherry-pick this into the 10 release. There are no new releases planned for earlier versions.

Thanks @tra!

@hans: I would leave the decision to cherry-pick this into the 10 release to you. I think the change is nice to have, but once you know the problem, there exists an easy workaround (like symlinking the executables to the right directory).

Sorry for the delay. I have no objection to cherrypick this change to release 10. Thanks.

hans added a comment.Jan 22 2020, 8:41 AM

Sorry for the delay. I have no objection to cherrypick this change to release 10. Thanks.

I've cherry-picked it as 3cce3790072249cbe51b96cea26bc78019c11fd0. Thanks!