16 lines
429 B
Bash
16 lines
429 B
Bash
#!/bin/bash
|
|
cat > /tmp/test_arch.hip << 'HIPEOF'
|
|
#include <hip/hip_runtime.h>
|
|
__global__ void test_kernel(float *a) { a[threadIdx.x] = 1.0f; }
|
|
HIPEOF
|
|
|
|
for arch in gfx1013 gfx1010 gfx10-1-generic; do
|
|
echo "=== Testing $arch ==="
|
|
/opt/rocm/bin/hipcc --offload-arch=$arch -c /tmp/test_arch.hip -o /tmp/test_${arch}.o 2>&1
|
|
echo "Exit: $?"
|
|
if [ -f /tmp/test_${arch}.o ]; then
|
|
ls -l /tmp/test_${arch}.o
|
|
fi
|
|
echo ""
|
|
done
|