-
Notifications
You must be signed in to change notification settings - Fork 812
Open
Description
I find that the device and host results from the nbody programs in SYCL and OpenMP (icpx) do not match when the error bound is 1e-3. The program is https://github.com/zjin-lcf/HeCBench/tree/master/src/nbody-sycl.
The results match for the CUDA, HIP and OpenMP programs (nvc++ and amdclang++).
The issue can be reproduced on Intel and other vendors' GPUs.
On an Intel GPU
nbody-omp$ make run
icpx -std=c++17 -Wall -I../nbody-cuda -O3 -fiopenmp -fopenmp-targets=spir64 -D__STRICT_ANSI__ -c main.cpp -o main.o
icpx -std=c++17 -Wall -I../nbody-cuda -O3 -fiopenmp -fopenmp-targets=spir64 -D__STRICT_ANSI__ -c GSimulation.cpp -o GSimulation.o
icpx -std=c++17 -Wall -I../nbody-cuda -O3 -fiopenmp -fopenmp-targets=spir64 -D__STRICT_ANSI__ main.o GSimulation.o -o main
./main 16000 10
===============================
Initialize Gravity Simulation
# Total Energy : 14571.5
# Total Time (s) : 0.118287
# Average Performance : 1616.15 +- 331.716
===============================
FAIL
On an NVIDIA GPU
make CUDA=yes CUDA_ARCH=sm_90 CC=icpx run -B
icpx -std=c++17 -Wall -I../nbody-cuda -fsycl --gcc-toolchain= -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90 -O3 -DUSE_GPU -c main.cpp -o main.o
icpx -std=c++17 -Wall -I../nbody-cuda -fsycl --gcc-toolchain= -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90 -O3 -DUSE_GPU -c GSimulation.cpp -o GSimulation.o
icpx -std=c++17 -Wall -I../nbody-cuda -fsycl --gcc-toolchain= -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_90 -O3 -DUSE_GPU main.o GSimulation.o -o main
fatbinary warning : option 'image' has been deprecated
fatbinary warning : option 'image' has been deprecated
./main 16000 10
===============================
Initialize Gravity Simulation
# Total Energy : 14571.5
# Total Time (s) : 0.0262945
# Average Performance : 2891.07 +- 253.893
===============================
FAIL
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels