加快Pythonic合集群实现:CPU和GPU之间的比较
Maximilian H Kriebel1, Paweł Tecmer1, Marta Gałyńska1
1Institute of Physics, Faculty of Physics, Astronomy, and Informatics, Nicolaus Copernicus University in Toruń, Grudziadzka 5, 87-100 Toruń, Poland.
Journal of chemical theory and computation
|February 2, 2024
概括
这项研究对Python程序进行了张量收缩的基准测试,使用GPU加速合集群计算. 在GPU上的CuPy为张量运算提供了10-16倍的加速度,为混合CPU-GPU实现提供了3-4倍的加速度.
科学领域:
- 计算化学计算化学
- 高性能计算 高性能计算
- 科学软件开发科学软件开发
背景情况:
- 合集群 (CC) 方法对于精确的量子化学模拟至关重要.
- 有效的张量收缩是CC实现的一个主要瓶.
- 利用图形处理单元 (GPU) 可以显著加速这些计算.
研究的目的:
- 为了对Python程序进行比较,以获得张量收缩效率.
- 为了确定合集群 (CC) 实现的最佳张量运算.
- 使用GPU加速瓶张量运算.使用GPU加速瓶张量运算.
主要方法:
- 基于时间和内存要求对Python程序进行基准测试.
- 使用NVIDIA GPU与计算统一设备架构 (CUDA) API和CuPy库.
- 由于内存限制,实施批量智能的GPU计算.
- 比较单独的CPU和CPU-GPU混合实现.
主要成果:
- 与36个CPU内核相比,CuPy实现了10-16倍的瓶张力收缩速度.
- 混合CPU-GPU实现显示了对CCSD和pCCD-LCCSD的仅CPU计算的3-4倍加速度.
- 确定了用于GPU加速的最佳张量收缩策略.
结论:
- 使用CuPy的GPU加速显著提高了Pythonic合集群计算的性能.
- 批量处理是克服GPU内存限制的可行策略.
- 混合CPU-GPU方法为量子化学模拟提供了相当大的加速度.
相关概念视频
Parallel Processing
152
The brain processes sensory information rapidly due to parallel processing, which involves sending data across multiple neural pathways at the same time. This method allows the brain to manage various sensory qualities, such as shapes, colors, movements, and locations, all concurrently. For instance, when observing a forest landscape, the brain simultaneously processes the movement of leaves, the shapes of trees, the depth between them, and the various shades of green. This enables a quick and...
152
Distribution of Molecular Speeds
3.9K
The motion of molecules in a gas is random in magnitude and direction for individual molecules, but a gas of many molecules has a predictable distribution of molecular speeds. This predictable distribution of molecular speeds is known as the Maxwell-Boltzmann distribution. The distribution of molecular speeds in liquids is comparable to that of gases but not identical and can help to understand the phenomenon of the boiling and vapor pressure of a liquid. Consider that a molecule requires a...
3.9K
Ampere-Maxwell's Law: Problem-Solving
630
A parallel-plate capacitor with capacitance C, whose plates have area A and separation distance d, is connected to a resistor R and a battery of voltage V. The current starts to flow at t = 0. What is the displacement current between the capacitor plates at time t? From the properties of the capacitor, what is the corresponding real current?
To solve the problem, we can use the equations from the analysis of an RC circuit and Maxwell's version of Ampère's law.
For the first part of...
To solve the problem, we can use the equations from the analysis of an RC circuit and Maxwell's version of Ampère's law.
For the first part of...
630
Maxwell-Boltzmann Distribution: Problem Solving
1.5K
Individual molecules in a gas move in random directions, but a gas containing numerous molecules has a predictable distribution of molecular speeds, which is known as the Maxwell-Boltzmann distribution, f(v).
This distribution function f(v) is defined by saying that the expected number N (v1,v2) of particles with speeds between v1 and v2 is given by
This distribution function f(v) is defined by saying that the expected number N (v1,v2) of particles with speeds between v1 and v2 is given by
1.5K
Molecular Comparison of Gases, Liquids, and Solids
41.1K
Particles in a solid are tightly packed together (fixed shape) and often arranged in a regular pattern; in a liquid, they are close together with no regular arrangement (no fixed shape); in a gas, they are far apart with no regular arrangement (no fixed shape). Particles in a solid vibrate about fixed positions (cannot flow) and do not generally move in relation to one another; in a liquid, they move past each other (can flow) but remain in essentially constant contact; in a gas, they move...
41.1K
Pharmacokinetic Models: Comparison and Selection Criterion
73
Physiological and compartmental models are valuable tools used in studying biological systems. These models rely on differential equations to maintain mass balance within the system, ensuring an accurate representation of the dynamic processes at play.
Physiological models take a detailed approach by considering specific molecular processes. They can predict drug distribution, metabolism, and elimination changes, providing a comprehensive understanding of how drugs interact with the body.
Physiological models take a detailed approach by considering specific molecular processes. They can predict drug distribution, metabolism, and elimination changes, providing a comprehensive understanding of how drugs interact with the body.
73


