intel / intel/llvm

Test built-ins.cpp failing for AMD HIP

Open
#14,404 1 comment 0 reactions 0 assignees View on GitHub
bug confirmed hip
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### Describe the bug

The test sycl/test-e2e/Basic/built-ins.cpp is failing when run on AMD HIP GPU. See below for commands to reproduce and resulting errors. The fail snippet has been taken from here:
Upon resolution, please remove XFAIL from the test source.

### To reproduce

```
# RUN: at line 1
/__w/llvm/llvm/toolchain/bin//clang++ -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx10[31](https://github.com/intel/llvm/actions/runs/9716365508/job/26824198468?pr=14354#step:22:32) -fsycl -fsycl-targets=amdgcn-amd-amdhsa /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/built-ins.cpp -o /__w/llvm/llvm/build-e2e/Basic/Output/built-ins.cpp.tmp.out
# executed command: /__w/llvm/llvm/toolchain/bin//clang++ -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx1031 -fsycl -fsycl-targets=amdgcn-amd-amdhsa /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/built-ins.cpp -o /__w/llvm/llvm/build-e2e/Basic/Output/built-ins.cpp.tmp.out
# note: command had no output on stdout or stderr
# RUN: at line 2
env ONEAPI_DEVICE_SELECTOR=hip:gpu /__w/llvm/llvm/build-e2e/Basic/Output/built-ins.cpp.tmp.out | /__w/llvm/llvm/toolchain/bin/FileCheck /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/built-ins.cpp
# executed command: env ONEAPI_DEVICE_SELECTOR=hip:gpu /__w/llvm/llvm/build-e2e/Basic/Output/built-ins.cpp.tmp.out
# .---command stderr------------
# | Memory access fault by GPU node-1 (Agent handle: 0x23877d0) on address (nil). Reason: Page not present or supervisor privilege.
# `-----------------------------
# error: command failed with exit status: -6
# executed command: /__w/llvm/llvm/toolchain/bin/FileCheck /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/built-ins.cpp
# .---command stderr------------
# | FileCheck error: '' is empty.
# | FileCheck command line: /__w/llvm/llvm/toolchain/bin/FileCheck /__w/llvm/llvm/llvm/sycl/test-e2e/Basic/built-ins.cpp
# `-----------------------------
# error: command failed with exit status: 2

```

### Environment

- OS: Agnostic
- Target device and vendor: AMD GPU
- DPC++ version: [e.g. commit hash or output of `clang++ --version`]
- Dependencies version: [e.g. the output of `rocm-smi` and `sycl-ls --verbose`]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.