vetter / shoc

The SHOC Benchmark Suite
Other
242 stars 104 forks source link

trying cuda on clang and HIPing shoc #48

Open psteinb opened 8 years ago

psteinb commented 8 years ago

dear SHOCers,

I am contemplating to modify shoc to use the clang compiler that has recently adopted mainline support for CUDA. http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html#cuda-support-in-clang I'd like to know if you would be interest in PRs that enable SHOC to use this compiler toolchain?

On a related note, it would be interesting to compare native OpenCL SHOC results to HIPified CUDA benchmarks: http://gpuopen.com/hip-release-0-82/ As I have no feeling how mature a 0.82 release would be, this more an experiment. But still, I'd like to know if the SHOC community would be interested.

jyoung3131 commented 8 years ago

Peter, I probably can't speak for the main SHOC team, but I think that a PR that enables clang compilation would be a very useful and interesting addition to the SHOC suite.

HIP does look pretty neat and would be a good test case for comparing CUDA->HIP with OpenCL. I personally would be interested to know the results for some of the Level 1 benchmarks, especially ones that pull in cuBLAS or other CUDA-specific math libraries.

psteinb commented 8 years ago

Hi jyoung3131, I'll see to it and will send a PR ... once I get my head around autoconf and friends. I know that others are already looking into HIPifying SHOC as well, so it's good to see that the community would be interested.

bensander commented 8 years ago

Hi Folks - I think this is a great idea. We have done some internal work with hipifying SHOC and have Level0 and Level2 tests running. I want to clean up the tool support (HCC and HIP) for handling C++ structures across G++ and HCC (rather than hacking the shoc/src/common files or converting the entire project to compile HCC). This "cross-compile" support will be useful for other projects that want to use both G++ for host code and HCC for accelerator code.

In the meantime we did share a hipified version the Level0 BusBandwidth here: https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/tree/master/samples/1_Utils/hipBusBandwidth

wujingyue commented 8 years ago

I tried compiling SHOC with the upstream Clang and managed to build at least ten benchmarks. Others use texture APIs which the upstream Clang doesn't support yet.

FYI, the hack I did to compile SHOC with Clang was

Replace "set dummy nvcc" with "set dummy clang++" in ./configure
./configure CPPFLAGS="-I/usr/local/cuda/include -L/usr/local/cuda/lib64" CUDA_CPPFLAGS="--cuda-gpu-arch=sm_35" LDFLAGS="-L/usr/local/cuda/lib64" LIBS="-lcudart_static -lpthread -ldl" --without-mpi
make -j32 -k
aditya4d1 commented 8 years ago

Hi, I have created a pull request https://github.com/vetter/shoc/pull/50. Any comments is appreciated.