Skip to content

Commit

Permalink
Merge branch 'master' into improve_gen_grids
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 authored Dec 18, 2023
2 parents 164a4c3 + 5d660d8 commit 4fb6db5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ GPU plugin for PySCF
Installation
--------

> [!NOTE]
> The compiled binary packages support compute capability 7.0 and later (Volta and later, such as Tesla V100, RTX 20 series and later). For older GPUs, please compile the package with the source code as follows.
For **CUDA 11.x**
```sh
pip3 install gpu4pyscf-cuda11x
Expand Down
1 change: 1 addition & 0 deletions examples/dft_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
e_tot = mf_df.kernel()
scf_time = time.time() - start_time
print(f'compute time for energy: {scf_time:.3f} s')
exit()

start_time = time.time()
g = mf_df.nuc_grad_method()
Expand Down
7 changes: 4 additions & 3 deletions gpu4pyscf/lib/cutensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
_contraction_finds = {}

cutensor_backend.init(_handle)

CUTENSOR_ALGO_DEFAULT = cutensor_backend.ALGO_DEFAULT
except ImportError:
cutensor = None

CUTENSOR_ALGO_DEFAULT = None

def _create_mode_with_cache(mode):
integer_mode = []
for x in mode:
Expand Down Expand Up @@ -81,7 +82,7 @@ def create_contraction_descriptor(handle,
_contraction_descriptors[key] = desc
return desc

def create_contraction_find(handle, algo=cutensor_backend.ALGO_DEFAULT):
def create_contraction_find(handle, algo=CUTENSOR_ALGO_DEFAULT):
key = (handle.ptr, algo)
if key in _contraction_finds:
find = _contraction_finds[key]
Expand Down

0 comments on commit 4fb6db5

Please sign in to comment.