intel / intel/llvm

sycl-toolchain-hip maxworkgroup return negative number?

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

Description

**Describe the bug**
sycl/plugin/hip/pi_hip.cpp in version sycl-2022-12
how does the function `get_max_work_group_size` to get the number?
```
size_t *reqdThreadsPerBlock = kernel->reqdThreadsPerBlock_;
maxWorkGroupSize = command_queue->device_->get_max_work_group_size();
```

**To Reproduce**
I add the printf in source file at sycl/plugin/hip/pi_hip.cpp

The output is
```
---> piKernelSetArg(
: 0x1f8dbf0
: 4
: 8
: 0x1a5eee0
) ---> pi_result : PI_SUCCESS
[out]void * : 0x1a5eee0

---> piEnqueueKernelLaunch(
: 0x1f72640
: 0x1f8dbf0
: 2
: 0x2012ff0
: 0x2012fc0
: 0x2012fd8
: 1
pi_event * : 0x195ddb0[ 0x195dbb0 ... ]
pi_event * : 0x19ca3c8[ 0 ... ]
reqdThreadsPerBlock is [0,0,0]
maxWorkGroupSize is : -1694498771 , maxThreadsPerBlock is : 140727211951808
maxWorkGroupSize is 140727211951808 , threadsPerBlockdim is [16,16,1]
Segmentation fault (core dumped)
```

1. Include code snippet as short as possible
2. Specify the command which should be used to compile the program
3. Specify the comment which should be used to launch the program
4. Indicate what is wrong and what was expected

**Environment (please complete the following information):**

- Ubuntu 20.04
- Target device and vendor: AMD MI100
- DPC++ version: clang-16 sycl-2022-12
- Dependencies version: rocm

**Additional context**
Add any other context about the problem here.

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.