Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945496 - sys-devel/crossdev: add support for amdgcn/rocm offloading via GCC
Summary: sys-devel/crossdev: add support for amdgcn/rocm offloading via GCC
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-01 06:31 UTC by Sam James
Modified: 2024-12-20 06:05 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-01 06:31:08 UTC
GCC supports offloading to amdgcn/rocm targets but it needs to use LLVM for its assembler, per https://gcc.gnu.org/wiki/Offloading#For_AMD_GCN:.

I have offloading with GCC + nvptx essentially working (see bug 945296) so the infra is there, just the following needs to be done:
1) define a amdgcn-amdhsa* case statement in crossdev, copying nvtpx
2) figuring out how to express BPKG=... in there for LLVM (*)
3) updating toolchain.eclass to list amdgcn-amdhsa* too
4) done?

(*) It might be that we don't need to do anything for that specifically (might be able to leave it blank, possibly with some small hacks to crossdev to allow that), but we do need to wire in a way of telling it where the appropriate tools are.

CCing some people interested in rocm and also people who are interested in LLVM support in crossdev. I'm hoping one of you can help handle it as I'm a bit tired from all the nvptx work. I will of course help with any issues.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-01 06:33:01 UTC
(In reply to Sam James from comment #0)
> https://gcc.gnu.org/wiki/Offloading#For_AMD_GCN:.
> [...]
> 
> (*) It might be that we don't need to do anything for that specifically
> (might be able to leave it blank, possibly with some small hacks to crossdev
> to allow that), but we do need to wire in a way of telling it where the
> appropriate tools are.

Per that page, it might be as simple as just making a bunch of symlinks inside the just-created /usr/amdgcn-amdhsa ROOT.
Comment 2 Benjamin Schulz 2024-12-01 21:42:10 UTC Comment hidden (obsolete)
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-20 06:05:15 UTC
Someone was interested in the past: https://forums.gentoo.org/viewtopic-t-1143342-start-0.html