Skip to content

Commit e429208

Browse files
committed
Add amdgpu intrinsics
Add intrinsics for the amdgpu architecture.
1 parent 50134e1 commit e429208

File tree

7 files changed

+856
-2
lines changed

7 files changed

+856
-2
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
os: ubuntu-latest
8585
- tuple: nvptx64-nvidia-cuda
8686
os: ubuntu-latest
87+
- tuple: amdgcn-amd-amdhsa
88+
os: ubuntu-latest
8789
- tuple: thumbv6m-none-eabi
8890
os: ubuntu-latest
8991
- tuple: thumbv7m-none-eabi
@@ -201,6 +203,10 @@ jobs:
201203
tuple: aarch64-apple-ios-macabi
202204
os: macos-15
203205
norun: true # https://github.com/rust-lang/stdarch/issues/1206
206+
- target:
207+
tuple: amdgcn-amd-amdhsa
208+
os: ubuntu-latest
209+
norun: true
204210

205211
steps:
206212
- uses: actions/checkout@v4
@@ -212,12 +218,17 @@ jobs:
212218

213219
- run: rustup target add ${{ matrix.target.tuple }}
214220
shell: bash
215-
if: matrix.build_std == ''
221+
if: matrix.build_std == '' && matrix.target.tuple != 'amdgcn-amd-amdhsa'
216222
- run: |
217223
rustup component add rust-src
218224
echo "CARGO_UNSTABLE_BUILD_STD=std" >> $GITHUB_ENV
219225
shell: bash
220226
if: matrix.build_std != ''
227+
- run: |
228+
rustup component add rust-src
229+
echo "CARGO_UNSTABLE_BUILD_STD=core,alloc" >> $GITHUB_ENV
230+
shell: bash
231+
if: matrix.target.tuple == 'amdgcn-amd-amdhsa'
221232
222233
# Configure some env vars based on matrix configuration
223234
- run: echo "PROFILE=--profile=${{matrix.profile}}" >> $GITHUB_ENV
@@ -233,7 +244,7 @@ jobs:
233244
if: matrix.disable_assert_instr != ''
234245
- run: echo "NOSTD=1" >> $GITHUB_ENV
235246
shell: bash
236-
if: startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda'
247+
if: startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda' || matrix.target.tuple == 'amdgcn-amd-amdhsa'
237248

238249
# Windows & OSX go straight to `run.sh` ...
239250
- run: ./ci/run.sh
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ubuntu:25.10
2+
RUN apt-get update && apt-get install -y --no-install-recommends \
3+
gcc \
4+
libc6-dev \
5+
ca-certificates

ci/dox.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ if [ -z "$1" ]; then
3333
#dox mips64-unknown-linux-gnuabi64
3434
dox wasm32-unknown-unknown
3535
dox nvptx64-nvidia-cuda
36+
dox amdgcn-amd-amdhsa
3637
else
3738
dox "${1}"
3839
fi

ci/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ case ${TARGET} in
4242
armv7-*eabihf | thumbv7-*eabihf)
4343
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-feature=+neon"
4444
;;
45+
amdgcn-*)
46+
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-cpu=gfx900"
47+
;;
4548
# Some of our test dependencies use the deprecated `gcc` crates which
4649
# doesn't detect RISC-V compilers automatically, so do it manually here.
4750
riscv*)

0 commit comments

Comments
 (0)