sourcegraph / scip-clang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experimental support for CUDA

varungandhi-src opened this issue · comments

  • (Trivial) Change the list of extensions for main TU files to also have "cu". #433
  • (Easy) Basic support for code nav for CUDAKernelCallExpr. #435
  • (Unknown difficulty) Support for code nav for CUDAKernelCallExpr inside templates. Example: https://sourcegraph.com/github.com/apache/mxnet@b84609d/-/blob/src/operator/nn/pool.cuh?L111:17-111:39#tab=references (#437)
  • (Easy) Fix errors related to __clang_cuda_runtime_wrapper.h not being found (referenced from the <built-in> header for CUDA). #436
    • Uncertainty: Should we use -ccbin if present? It is absent when MXNet is compiled. And obviously GCC doesn't have this header.
  • (Easy) Add the appropriate include directory for CUDA. It seems like the installation structure is
    $CUDA_DIR
      |-- bin
      |      \-- nvcc
      |-- include
    
    • Uncertainty: Will there be more include dirs needed once that one is fixed. #433
  • (Easy) Add documentation on using CUDA support/gotchas. #441
  • (Easy-ish, a bit tedious) Zap unknown arguments (QOL improvement). #438
    error: unsupported option '--options-file=/home/varun/MDL-SDK/cmake/nvcc-option-use_fast_math.lst'
    error: unknown argument: '-forward-unknown-to-host-compiler'
    error: unknown argument: '-ccbin=/usr/bin/c++'
    error: unknown argument: '-rdc=true'
    error: unknown argument: '-forward-unknown-to-host-compiler'
    error: unknown argument '-arch=sm_50'; did you mean '-march=sm_50'?
    error: unknown argument: '-ptx'
    
    That said, maybe we should support --options-file by just inlining all the arguments from the file and then processing that?

Filed a separate issue for the GCC headers: #440