phono3py-gpu 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: phono3py-gpu
3
+ Version: 1.0.0
4
+ Summary: GPU plugin for phono3py
5
+ License-Expression: BSD-3-Clause
6
+ Project-URL: Repository, https://github.com/MoseyQAQ/phono3py-gpu
7
+ Project-URL: Issues, https://github.com/MoseyQAQ/phono3py-gpu/issues
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ License-File: LICENSE.phono3py
12
+ License-File: LICENSE.phonopy
13
+ License-File: LICENSE.wte
14
+ Requires-Dist: phono3py>=4.11.0
15
+ Requires-Dist: phonopy>=4.11.0
16
+ Requires-Dist: phonors>=0.9.0
17
+ Provides-Extra: cuda11
18
+ Requires-Dist: cupy-cuda11x<14,>=13.6; extra == "cuda11"
19
+ Provides-Extra: cuda12
20
+ Requires-Dist: cupy-cuda12x>=13.6; extra == "cuda12"
21
+ Provides-Extra: cuda13
22
+ Requires-Dist: cupy-cuda13x>=13.6; extra == "cuda13"
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest>=8; extra == "test"
25
+ Dynamic: license-file
26
+
27
+ # phono3py-gpu
28
+
29
+ English | [简体中文](README_CN.md)
30
+
31
+ - **A phono3py plugin** that works with your existing phono3py workflows.
32
+ - **Single- and multi-GPU acceleration** for lattice thermal conductivity on NVIDIA GPUs.
33
+ - **10–50× speedups in selected benchmarks**.
34
+
35
+ ## Installation
36
+
37
+ Requirements:
38
+
39
+ - Python >=3.11
40
+ - phono3py >=4.11.0
41
+ - phonopy >=4.11.0
42
+ - phonors >=0.9.0
43
+ - CuPy >=13.6 (CUDA 11: <14)
44
+ - An NVIDIA GPU with a compatible driver
45
+ - CUDA Toolkit matching your CuPy installation
46
+
47
+ Choose **one** CUDA option for your environment:
48
+
49
+ | CUDA Toolkit | Installation option |
50
+ |---|---|
51
+ | 11.2–11.8 | `cuda11` |
52
+ | 12.x | `cuda12` |
53
+ | 13.x | `cuda13` |
54
+
55
+ The example below uses **CUDA 12**. Replace `cuda12` if needed:
56
+
57
+ ```bash
58
+ git clone https://github.com/MoseyQAQ/phono3py-gpu.git
59
+ cd phono3py-gpu
60
+ pip3 install '.[cuda12]'
61
+ ```
62
+
63
+ If a compatible CuPy is already installed, use `pip3 install .` instead.
64
+
65
+ ## Quick start
66
+
67
+ ### CLI
68
+
69
+ ```bash
70
+ # Run in a calculation directory containing matching input files:
71
+ # phono3py_params.yaml: structure and supercells
72
+ # fc2.hdf5: second-order force constants
73
+ # fc3.hdf5: third-order force constants
74
+ # Input preparation: https://phonopy.github.io/phono3py/
75
+
76
+ # BTE-RTA at 300 K using GPU
77
+ phono3py --br --tt GPU --mesh 9 9 9 --ts 300
78
+ ```
79
+
80
+ Results are written to a `kappa-*.hdf5` file in the calculation directory.
81
+
82
+ ### API
83
+
84
+ ```python
85
+ import phono3py
86
+
87
+ ph3 = phono3py.load(
88
+ "phono3py_params.yaml",
89
+ fc2_filename="fc2.hdf5",
90
+ fc3_filename="fc3.hdf5",
91
+ )
92
+ ph3.mesh_numbers = [9, 9, 9]
93
+ ph3.init_phph_interaction()
94
+ ph3.run_thermal_conductivity(
95
+ temperatures=[300],
96
+ transport_type="GPU", # Important
97
+ write_kappa=True,
98
+ )
99
+ print(ph3.thermal_conductivity.kappa)
100
+ ```
101
+
102
+ In an existing Python calculation, select the plugin with `transport_type="GPU"` or `"WTE-GPU"`.
103
+
104
+ ## Supported transport methods
105
+
106
+ | Method | Python `transport_type` | Python `is_LBTE` | CLI options |
107
+ |---|---|---|---|
108
+ | BTE-RTA | `"GPU"` | `False` (default) | `--br --tt GPU` |
109
+ | LBTE | `"GPU"` | `True` | `--lbte --tt GPU` |
110
+ | WTE-RTA | `"WTE-GPU"` | `False` (default) | `--br --tt WTE-GPU` |
111
+ | WTE-LBTE | `"WTE-GPU"` | `True` | `--lbte --tt WTE-GPU` |
112
+
113
+ WTE is included; no separate phono3py-wte installation is needed.
114
+
115
+ To read the final q point’s three-phonon interaction strengths in Python after GPU LBTE or WTE-LBTE, set `PHONO3PY_GPU_RETAIN_PP=1`. [Details](docs/advanced.md#performance-tuning)
116
+
117
+ ## Use multiple GPUs
118
+
119
+ Calculations use all visible GPUs on the same machine. Set `CUDA_VISIBLE_DEVICES` before starting to select GPUs; for example, to use GPUs 0 and 1:
120
+
121
+ ```bash
122
+ CUDA_VISIBLE_DEVICES=0,1 phono3py --br --tt GPU --mesh 9 9 9 --ts 300 \
123
+ --average-degenerate-weights --exclude-gamma-acoustic
124
+ ```
125
+
126
+ Use `CUDA_VISIBLE_DEVICES=0` for one GPU. The same setting works with Python scripts. For LBTE, the global solve still uses one GPU by default; see [memory requirements and solver options](docs/advanced.md#out-of-memory).
127
+
128
+ ## Performance
129
+
130
+ CPU: AMD Ryzen Threadripper PRO 5995WX (8 threads). GPU: NVIDIA Tesla V100 (16 GB). Times are in seconds.
131
+
132
+ | Case | Phonon branches | Mesh | CPU | 1 GPU | 2 GPUs | 4 GPUs |
133
+ |---|---:|---|---:|---:|---:|---:|
134
+ | Si · BTE-RTA | 24 | 19³ | 178.8 | 26.9 | 15.7 | 9.7 |
135
+ | AlN · BTE-RTA | 12 | 25×25×17 | 286.8 | 39.0 | 25.1 | 16.8 |
136
+ | ABO · LBTE | 60 | 6×6×5 | 301.8 | 11.9 | 10.1 | 9.3 |
137
+ | ABO · WTE-RTA | 60 | 6×6×5 | 266.2 | 9.1 | 7.5 | 6.6 |
138
+
139
+ ## Help and contributing
140
+
141
+ - [Troubleshooting and advanced usage](docs/advanced.md): GPU detection, multiple GPUs, memory, and tuning.
142
+ - [phono3py documentation](https://phonopy.github.io/phono3py/): input preparation and transport settings.
143
+ - [GitHub Issues](https://github.com/MoseyQAQ/phono3py-gpu/issues): questions, bug reports, and feature requests.
144
+
145
+ Contributions are welcome. See [development setup](docs/advanced.md#development) for installation and testing instructions.
146
+
147
+ ## License and acknowledgements
148
+
149
+ Distributed under the [BSD 3-Clause license](LICENSE).
150
+
151
+ This project builds on [phono3py](https://github.com/phonopy/phono3py), [phonopy](https://github.com/phonopy/phonopy), and [phono3py-wte](https://github.com/MSimoncelli/phono3py-wte). Their notices are included in [LICENSE.phono3py](LICENSE.phono3py), [LICENSE.phonopy](LICENSE.phonopy), and [LICENSE.wte](LICENSE.wte).
@@ -0,0 +1,32 @@
1
+ phono3py_gpu/__init__.py,sha256=4lZkaIa4p2Pv8kSp-g_jNJyyniNy2a5izPvHfz0WCU8,665
2
+ phono3py_gpu/_wte.py,sha256=n1nA4DdIOkafQfb1mU9KRV5jU8q_2572KATMYAeMPQg,19364
3
+ phono3py_gpu/backend.py,sha256=1AI483vXoB8k61j-_CswvnKatQ9tv-F1xRKo6fkE2Do,2161
4
+ phono3py_gpu/batching.py,sha256=TqRFk_YspwZVaPtxhVBmGBvib6J1CpQl1iixItE6RXE,8722
5
+ phono3py_gpu/collision.py,sha256=7qSQHa9Toci_whUb8HV2bq4pyxbVl_DOkUvTeNzGE30,18566
6
+ phono3py_gpu/eigensolver.py,sha256=GM6qMRPVS9vgbl3f9KVd6sBhOtskkLuGri-SXl2Xw8I,8662
7
+ phono3py_gpu/factory.py,sha256=WF8P1LmK808m8idz3m_1OXUHU8ROSfx05dMtypVHbsg,13853
8
+ phono3py_gpu/fourier.py,sha256=nqOeCd49gv2_Isp0QOTGGskWIPniKY52Rkb-spk4Rc0,19957
9
+ phono3py_gpu/harmonic.py,sha256=TISuzrW0Q-hNeYlidYvVVW7cJz5_zUOgLEsaBVXGJzA,11238
10
+ phono3py_gpu/initialization.py,sha256=UL3IvjepJwHEH0JbI4Za83aTsNDAY5fLooO8zPDHjhU,2261
11
+ phono3py_gpu/integration.py,sha256=iOcA6JZYytuzQaeqiVSdaJD7g9OHFqp6jbwVFGsvdnE,6329
12
+ phono3py_gpu/interaction.py,sha256=7RKp8HLiZ9Mdungsd6iDF53ugEPzifGu1OrU2NutwQ8,11089
13
+ phono3py_gpu/isotope.py,sha256=6GVJAuzDmc-VSiapbaPORJcfXCUrkU5ModBNBuDBkH4,4903
14
+ phono3py_gpu/kappa.py,sha256=-j_vasE9qpH5QFRIW8G-wKNpSw6xKICO7nEn30C96rA,1391
15
+ phono3py_gpu/multigpu.py,sha256=-JSXMsUGIKpHYK7Coolp6nc4aQVb9VpxU0WLJrDcIVs,12868
16
+ phono3py_gpu/scattering.py,sha256=J0Re9ltvd1jCq-R8uS0kS_xeuHcM4xNxwLfXLHEHtL8,17736
17
+ phono3py_gpu/velocity.py,sha256=6DeqOvFfbppNWF7dBRzayYgVaPolNrVvrDZxwMrNBwE,8063
18
+ phono3py_gpu/kernels/collision.cu,sha256=wEwaBeqOyOkkGUfEHcSOGO1sHTheoDHMgKvO8sKm05A,518
19
+ phono3py_gpu/kernels/degeneracy.cu,sha256=jjU3BlaiLJKBT0uMyk6N2XsQ5bUyWHC3RAmh-mJxU3k,1601
20
+ phono3py_gpu/kernels/interaction.cu,sha256=_zansrUOLErzvQj0t5JZXg7Xi67y1uaZZmN4Chg0Tvw,3909
21
+ phono3py_gpu/kernels/isotope.cu,sha256=99tBYiIOLI4WwnJKV5szofXPOXhG0-AYa5ChKnqHwSw,1244
22
+ phono3py_gpu/kernels/scattering.cu,sha256=b2RrFqr-ZJTPFib9W6Fscme5trJhECb30h4WnICClu0,3692
23
+ phono3py_gpu/kernels/tetrahedron.cu,sha256=7MWJTtdbRLgnRw0N4rJp6wvJyNc1WQouzU47WP64hIM,28177
24
+ phono3py_gpu-1.0.0.dist-info/licenses/LICENSE,sha256=0WjrLyuz8RiJ3tEgTSyipIHISaoA9LyzniYDGh-uPPw,1470
25
+ phono3py_gpu-1.0.0.dist-info/licenses/LICENSE.phono3py,sha256=0WjrLyuz8RiJ3tEgTSyipIHISaoA9LyzniYDGh-uPPw,1470
26
+ phono3py_gpu-1.0.0.dist-info/licenses/LICENSE.phonopy,sha256=LOJoOci3DSh2XXPpNMwal52JbY0ijTBpT92akulNQ6k,1470
27
+ phono3py_gpu-1.0.0.dist-info/licenses/LICENSE.wte,sha256=DbBCVRF0GJakrS1dhTtLPPJpSWNWD6FT9LBtVVxtyJg,1499
28
+ phono3py_gpu-1.0.0.dist-info/METADATA,sha256=wOsDiOQSqJU-OS7OYLljFz36F-LrpmvcR7fIY4ZAyf0,5150
29
+ phono3py_gpu-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
30
+ phono3py_gpu-1.0.0.dist-info/entry_points.txt,sha256=cj4F9zDZs3cKQC5n6pNBsKkmJKjhakvAM51gGOcf7w0,52
31
+ phono3py_gpu-1.0.0.dist-info/top_level.txt,sha256=oaiOYlmhQroA74fhsjOL1YMl8sv_jXZbjOa5h1B0-1Q,13
32
+ phono3py_gpu-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [phono3py.conductivity]
2
+ GPU = phono3py_gpu:register
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2015-2024, Phonopy. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * Neither the name of the phonopy project nor the
13
+ names of its contributors may be used to endorse or promote products
14
+ derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT
20
+ HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2015-2024, Phonopy. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * Neither the name of the phonopy project nor the
13
+ names of its contributors may be used to endorse or promote products
14
+ derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT
20
+ HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2014-2024, Phonopy. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * Neither the name of the phonopy project nor the
13
+ names of its contributors may be used to endorse or promote products
14
+ derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT
20
+ HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Atsushi Togo
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1 @@
1
+ phono3py_gpu