Skip to content

WIP: Detect device target from binary tag in Gaudi build

Roel Aaij requested to merge raaij_cuda_host_compiler into master

This is a proposal for the detection of the device target in Gaudi builds of Allen. By adding the device target to the BINARY_TAG_COMP_SUBTYPE part of the binary tag, it can be inspected when building Allen and the build can then be configured accordingly. This MR uses the CUDA build as an example.

In particular the fact that CUDA releases may not support the compiler used by the rest of the build is handled. What gcc and clang versions are compatible with a CUDA release cannot be obtained from CUDA easily, so this information is stored in a CMake module. The latest compatible gcc or clang version is then found and the CMAKE_CUDA_HOST_COMPILER variable set accordingly. That allows the project to build host-only code with the compiler required tag.

In short, with a binary tag of x86_64-centos7-gcc9+cuda10.2gcc8-opt Allen will be built using gcc 9 for host-only code and gcc 8 will be used as a host compiler by nvcc. Allen builds and runs successfully.

FYI: @clemenci @bcouturi

Edited by Roel Aaij

Merge request reports

Loading