-
Notifications
You must be signed in to change notification settings - Fork 438
SYCL device property init writes maxGridSize[0] three times #4994
Copy link
Copy link
Closed
Description
- Type: Correctness / Copy-paste index bug
- Severity: Medium
- Component: GPU device capability initialization (SYCL)
- Location:
Src/Base/AMReX_GpuDevice.cpp:568
Problem
In the SYCL initialization path, maxGridSize is assigned three times to index 0:
device_prop.maxGridSize[0] = -1;
device_prop.maxGridSize[0] = -1;
device_prop.maxGridSize[0] = -1;Indices 1 and 2 are never explicitly assigned here.
Impact
- Directional limits become inconsistent (
dir=1/dir=2may keep default values). - If
maxBlocksPerGrid(1|2)is used, behavior can diverge from intended “unknown = -1” sentinel.
Suggested patch
--- a/Src/Base/AMReX_GpuDevice.cpp
+++ b/Src/Base/AMReX_GpuDevice.cpp
@@
- device_prop.maxGridSize[0] = -1; // xxxxx SYCL todo: unknown
- device_prop.maxGridSize[0] = -1; // unknown
- device_prop.maxGridSize[0] = -1; // unknown
+ device_prop.maxGridSize[0] = -1; // xxxxx SYCL todo: unknown
+ device_prop.maxGridSize[1] = -1; // unknown
+ device_prop.maxGridSize[2] = -1; // unknownPrepared by Codex
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels