tra added inline comments.
Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:34
+ const char *ErrStr = nullptr;
+ CUresult Result = cuGetErrorString(Err, &ErrStr);
+ if (Result != CUDA_SUCCESS)
jhuber6 wrote:
> tra wrote:
> > One problem with this approach is t
jhuber6 added inline comments.
Comment at: clang/tools/nvptx-arch/CMakeLists.txt:19
+if (NOT CUDA_FOUND OR NOT cuda-library)
+ message(STATUS "Not building nvptx-arch: cuda runtime not found")
+ return()
tra wrote:
> Nit: libcuda.so is part of the NVIDIA driver
tra added inline comments.
Comment at: clang/tools/nvptx-arch/CMakeLists.txt:19
+if (NOT CUDA_FOUND OR NOT cuda-library)
+ message(STATUS "Not building nvptx-arch: cuda runtime not found")
+ return()
Nit: libcuda.so is part of the NVIDIA driver which provides N
Hahnfeld added inline comments.
Comment at: clang/tools/nvptx-arch/CMakeLists.txt:28
+
+clang_target_link_libraries(nvptx-arch PRIVATE ${cuda-library})
This broke my build with `CLANG_LINK_CLANG_DYLIB`; we must use the standard
CMake `target_link_libraries` for
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd5a5ee856e7c: [Clang] Add `nvptx-arch` tool to query
installed NVIDIA GPUs (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140433/new/
tianshilei1992 accepted this revision.
tianshilei1992 added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140433/new/
https://reviews.llvm.org/D140433
___
jhuber6 updated this revision to Diff 484637.
jhuber6 added a comment.
Print to `stderr` and only return `1` if thre was an actual error. A lack of
devices is considered a success and we print nothing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D
arsenm added inline comments.
Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:37
+return 1;
+ printf("CUDA error: %s\n", ErrStr);
+ return 1;
stderr?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140433/new/
jhuber6 updated this revision to Diff 484594.
jhuber6 added a comment.
Change header I copied from the AMD implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140433/new/
https://reviews.llvm.org/D140433
Files:
clang/tools/CMakeLists.t
jhuber6 added inline comments.
Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:63
+
+printf("sm_%d%d\n", Major, Minor);
+ }
tianshilei1992 wrote:
> Do we want to include device number here?
For `amdgpu-arch` and here we just have it implicitly in the order,
tianshilei1992 added inline comments.
Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:63
+
+printf("sm_%d%d\n", Major, Minor);
+ }
Do we want to include device number here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews
jhuber6 created this revision.
jhuber6 added reviewers: JonChesterfield, tra, yaxunl, jdoerfert,
tianshilei1992, MaskRay.
Herald added subscribers: kosarev, mattd, gchakrabarti, asavonic, StephenFan,
tpr.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscri
12 matches
Mail list logo