pytorch
44d7bbfe - [cpp extension] Allow setting PYTORCH_NVCC to a customized nvcc in torch cpp extension build (#96987)

Commit
1 year ago
[cpp extension] Allow setting PYTORCH_NVCC to a customized nvcc in torch cpp extension build (#96987) per title I can write a script named `nvcc` like this ```bash #!/bin/bash /opt/cache/bin/sccache /usr/local/cuda/bin/nvcc $@ ``` and set its path to `PYTORCH_NVCC` (added in this PR), along with another `sccache-g++` script to env var `CXX`. https://github.com/pytorch/pytorch/blob/cfa6b52e02eb61f71c0034d5b7e73e365420f35a/torch/utils/cpp_extension.py#L2106-L2109 With ninja, I can fully enable c-cached build on my cuda extensions. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96987 Approved by: https://github.com/ezyang
Author
Committer
Parents
Loading