D5210: Proper CUDA handling

Aetf noreply at phabricator.kde.org
Tue Mar 28 18:15:10 UTC 2017


qi437103 added a comment.


  CUDA is compatible with both C and C++. But clang only accepts `c++11` etc for `-std`. For example, with `c11`, clang says
  
    error: invalid argument '-std=c11' not allowed with 'CUDA'

INLINE COMMENTS

> mwolff wrote in settingsmanager.h:45
> why do we need three args for cuda now? why can't this be one like the other languages?

Because I can't find a way to combine the `--cuda-path=/some/path` flag into `cudaArguments` and then reliably distinguish between auto detection and manually set path. Also, when using language profiles other than custom, the line edit is disabled with default arguments, so we need separate line edit for cuda path anyway.

But I agree that this doesn't feel good. Any suggestions are welcomed.

> mwolff wrote in definesandincludesmanager.cpp:119
> this looks fishy. at least add some comments please
> 
> i.e. why is going two dirs up from nvcc the right cuda-path? that looks pretty arbitrary

Cuda is usually installed in a single folder with fixed structure, i.e. path to nvcc is `/path/to/cuda/bin/nvcc`. That's why two cdUp. I'll add comments here.

> mwolff wrote in parserwidget.ui:356
> This is the installation *path*, not the flags, no?

It is flag. I was thinking this can give the user the ability to specify path using `--cuda-path=/pat/to/cuda`, or `-nocudainc -nocudalib` if they want, or completely nothing.

But this seems to be confusing, and probably no one will want to leave this completely empty, as clang won't work at all. I'll change it to path and match the auto detection behavior:

If auto detect failed, or user specified empty path, use `-nocudainc -nocudalib`,
otherwise use `--cuda-path=/path/to/cuda`

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D5210

To: qi437103, kfunk, #kdevelop, mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170328/249b3505/attachment.html>


More information about the KDevelop-devel mailing list