pyscf / pyscf/gpu4pyscf

Succesfully compiled on RTX 5070 Ti (Blackwell) with CUDA 13.0

Open
#618 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cuda
Stars
351
Forks
84
Avg merge
3d 2h
Merged PRs (30d)
35

Description

Description
I successfully compiled and ran gpu4pyscf on the new NVIDIA RTX 5070 Ti (Blackwell architecture) with CUDA 13.0.

Since the official pre-built wheels do not support the new architecture yet, I had to compile from source. I encountered nvcc fatal : Unsupported gpu architecture 'compute_70' errors because CUDA 13 seems to have dropped support for older compute capabilities (or defaults strictly).

Environment

  • GPU: NVIDIA RTX 5070 Ti
  • CUDA Version: 13.0
  • OS: Linux (Ubuntu/WSL)
  • Python: 3.10

The Fix
I made two changes to get it working:

  1. Modified gpu4pyscf/lib/CMakeLists.txt:
    Changed the default architecture handling to use native (or 90 for Hopper/Blackwell compatibility) instead of the hardcoded 70-real;80-real;90-real.

    # Original
    # set(CMAKE_CUDA_ARCHITECTURES "70-real;80-real;90-real")
    
    # Modified
    set(CMAKE_CUDA_ARCHITECTURES "native")
    
  2. Modified setup.py:
    Relaxed the libxc version requirement because 0.5 is not available for CUDA 13 on PyPI, and I had to compile libxc from source using -DBUILD_LIBXC=ON.

    # Modified dependency check
    f'gpu4pyscf-libxc-cuda{CUDA_VERSION}>=0.5',
    

Build Command
I built it using:

export CMAKE_CONFIGURE_ARGS="-DCUDA_ARCHITECTURES=native -DBUILD_LIBXC=ON"
pip install -v -e .

Contributor guide

Open the contributing guide

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

Review gpu4pyscf/lib/CMakeLists.txt and setup.py, starting with the CUDA architecture setting and libxc dependency check described in the issue. Reproduce the editable install with CMAKE_CONFIGURE_ARGS="-DCUDA_ARCHITECTURES=native -DBUILD_LIBXC=ON" on CUDA 13.0, then verify that the RTX 5070 Ti build completes and runs without the reported architecture or dependency errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system, hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.