llvm / llvm/Polygeist

support for Cuda 12.1

Open
#395 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
624
Forks
170
PR merge metrics
No merged PRs in 30d

Description

I named the example `simple_matmul.cu` and tried to compile like

```
nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/nobu-polygeist-demos$ cgeist simple_matmul.cu -function=matmul -S
warning: CUDA version 12.1 is only partially supported
error: GPU arch sm_35 is supported by CUDA versions between 7.0 and 11.8 (inclusive), but installation at /usr/local/cuda-12.1 is 12.1; use '--cuda-path' to specify a different CUDA install, pass a different GPU arch with '--cuda-gpu-arch', or pass '--no-cuda-version-check'
:1:10: fatal error: '__clang_cuda_runtime_wrapper.h' file not found
1 | #include "__clang_cuda_runtime_wrapper.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/nobu-polygeist-demos$ cgeist simple_matmul.cu -function=matmul -S --cuda-gpu-a
rch sm_75
warning: CUDA version 12.1 is only partially supported
:1:10: fatal error: '__clang_cuda_runtime_wrapper.h' file not found
1 | #include "__clang_cuda_runtime_wrapper.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/nobu-polygeist-demos$
```

will Cuda 12.1 be supported soon? What are some workarounds?
My nvidia-smi and nvcc --version are:
```
nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/build$ nvidia-smi
Wed Apr 3 23:18:44 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.54 Driver Version: 531.97 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 1650 On | 00000000:01:00.0 Off | N/A |
| N/A 46C P0 17W / N/A| 0MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:
|
| GPU GI CI PID Type Process name
GPU Memory |
| ID ID
Usage |
|=======================================================================================|
| No running processes found
|
+---------------------------------------------------------------------------------------+
nyck33@lenovo-gtx1650:/mnt/d/LLVM/NewPolygeistDir/build$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Feb__7_19:32:13_PST_2023
Cuda compilation tools, release 12.1, V12.1.66
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with simple_matmul.cu using the cgeist commands shown, including CUDA 12.1 and the sm_75 override. Start by tracing the cgeist CUDA compilation entry point and its handling of the CUDA runtime wrapper and version checks. Done means the example compiles under CUDA 12.1 without the reported missing-header and compatibility errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.