NVIDIA / NVIDIA/cccl

[BUG]: cuda/ptx takes long to compile

Open
#5,721 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this bug and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Type of Bug

Silent Failure

### Component

Thrust

### Describe the bug

Regression: https://github.com/NVIDIA/cccl/issues/2933

cuda/ptx used to take 12ms to compile. Now it takes 4 seconds. It seems most time is spent in preprocessing. We should consider ways to speed up preprocessing.

Perfetto trace:
Image

### How to Reproduce

```
$ time nvcc -x cu -c <(echo '#include ')

real 0m4.186s
user 0m0.808s
sys 0m0.190s
```

perfetto:
```
$ echo '#include ' > cuda_ptx.cu
$ nvcc -fdevice-time-trace cuda_ptx -c cuda_ptx.cu
```

### Expected behavior

It should take way less time to compile.

### Reproduction link

_No response_

### Operating System

_No response_

### nvidia-smi output

_No response_

### NVCC version

13

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.