Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
f48eb17b
Unverified
Commit
f48eb17b
authored
Sep 26, 2024
by
Peter Eastman
Committed by
GitHub
Sep 26, 2024
Browse files
Added documentation on HIP (#4672)
* Added documentation on HIP * Instructions for building HIP on Windows
parent
0f67a646
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
28 deletions
+45
-28
docs-source/developerguide/07_cuda_platform.rst
docs-source/developerguide/07_cuda_platform.rst
+12
-12
docs-source/usersguide/application/01_getting_started.rst
docs-source/usersguide/application/01_getting_started.rst
+1
-1
docs-source/usersguide/application/02_running_sims.rst
docs-source/usersguide/application/02_running_sims.rst
+2
-2
docs-source/usersguide/library/01_introduction.rst
docs-source/usersguide/library/01_introduction.rst
+2
-2
docs-source/usersguide/library/02_compiling.rst
docs-source/usersguide/library/02_compiling.rst
+22
-8
docs-source/usersguide/library/04_platform_specifics.rst
docs-source/usersguide/library/04_platform_specifics.rst
+6
-0
docs-source/usersguide/library/08_amoeba_plugin.rst
docs-source/usersguide/library/08_amoeba_plugin.rst
+0
-3
No files found.
docs-source/developerguide/07_cuda_platform.rst
View file @
f48eb17b
...
@@ -8,23 +8,23 @@
...
@@ -8,23 +8,23 @@
.. _the-cuda-platform:
.. _the-cuda-platform:
The CUDA Platform
The CUDA
and HIP
Platform
s
#################
#################
#########
The CUDA platform
is
very similar to the OpenCL platform, and most of the
The CUDA
and HIP
platform
s are
very similar to the OpenCL platform, and most of the
previous chapter applies equally well to
i
t, just changing “OpenCL” to “Cuda”
in
previous chapter applies equally well to t
hem
, just changing “OpenCL” to “Cuda”
or
class names. There are a few differences worth noting.
"Hip" in
class names. There are a few differences worth noting.
Caching Kernels
Caching Kernels
***************
***************
Like the OpenCL platform, the CUDA platform compile
s all its
kernels at runtime.
Like the OpenCL platform, the CUDA
and HIP
platform
s
compile
their
kernels at runtime.
To improve performance,
it tries
to cache the compiled kernels on disk for
To improve performance,
they try
to cache the compiled kernels on disk for
later use. This allows subsequent Contexts to skip compiling some kernels. To
later use. This allows subsequent Contexts to skip compiling some kernels. To
make this work,
i
t need
s
a directory on disk where
i
t can write out temporary
make this work, t
hey
need a directory on disk where t
hey
can write out temporary
files. It is specified by the “
Cuda
TempDirectory” property when you create a
files. It is specified by the “TempDirectory” property when you create a
new Context.
It
usually can figure out a suitable value on
its
own, but
new Context.
They
usually can figure out a suitable value on
their
own, but
sometimes
i
t need
s
help. See the “Platform-Specific Properties” chapter of the
sometimes t
hey
need help. See the “Platform-Specific Properties” chapter of the
User's Manual for details.
User's Manual for details.
Accumulating Forces
Accumulating Forces
...
@@ -32,5 +32,5 @@ Accumulating Forces
...
@@ -32,5 +32,5 @@ Accumulating Forces
The OpenCL platform, as described in Section :numref:`computing-forces`\ , uses two types of buffers for
The OpenCL platform, as described in Section :numref:`computing-forces`\ , uses two types of buffers for
accumulating forces: a set of floating point buffers, and a single fixed point
accumulating forces: a set of floating point buffers, and a single fixed point
buffer. In contrast, the CUDA platform use
s
*only* the fixed point buffer
buffer. In contrast, the CUDA
and HIP
platform
s
use *only* the fixed point buffer
(represented by the CUDA type :code:`long` :code:`long`\ ).
(represented by the CUDA type :code:`long` :code:`long`\ ).
docs-source/usersguide/application/01_getting_started.rst
View file @
f48eb17b
...
@@ -96,6 +96,6 @@ CUDA version it was compiled with.
...
@@ -96,6 +96,6 @@ CUDA version it was compiled with.
python -m openmm.testInstallation
python -m openmm.testInstallation
This command confirms that OpenMM is installed, checks whether GPU acceleration
This command confirms that OpenMM is installed, checks whether GPU acceleration
is available (via the OpenCL and/or
CUDA
platforms), and verifies that all
is available (via the
CUDA,
OpenCL
,
and/or
HIP
platforms), and verifies that all
platforms produce consistent results.
platforms produce consistent results.
docs-source/usersguide/application/02_running_sims.rst
View file @
f48eb17b
...
@@ -414,7 +414,7 @@ Platforms
...
@@ -414,7 +414,7 @@ Platforms
=========
=========
When creating a :class:`Simulation`, you can optionally tell it what :class:`Platform` to use.
When creating a :class:`Simulation`, you can optionally tell it what :class:`Platform` to use.
OpenMM includes f
our
platforms: :class:`Reference`, :class:`CPU`, :class:`CUDA`,
and
:class:`OpenCL`. For a
OpenMM includes f
ive
platforms: :class:`Reference`, :class:`CPU`, :class:`CUDA`, :class:`OpenCL`
, and :class:`HIP`
. For a
description of the differences between them, see Section :numref:`platforms`. There are three ways in which
description of the differences between them, see Section :numref:`platforms`. There are three ways in which
the :class:`Platform` can be chosen:
the :class:`Platform` can be chosen:
...
@@ -431,7 +431,7 @@ of the :class:`Platform` to use. This overrides the default logic.
...
@@ -431,7 +431,7 @@ of the :class:`Platform` to use. This overrides the default logic.
platform = Platform.getPlatform('
CUDA
')
platform = Platform.getPlatform('
CUDA
')
simulation = Simulation(prmtop.topology, system, integrator, platform)
simulation = Simulation(prmtop.topology, system, integrator, platform)
The platform name should be one of :code:`OpenCL`, :code:`CUDA`, :code:`CPU`, or
The platform name should be one of :code:`OpenCL`, :code:`CUDA`,
:code:`HIP`,
:code:`CPU`, or
:code:`Reference`.
:code:`Reference`.
You also can specify platform-specific properties that customize how
You also can specify platform-specific properties that customize how
...
...
docs-source/usersguide/library/01_introduction.rst
View file @
f48eb17b
...
@@ -347,7 +347,7 @@ The choice of which platform to use for a simulation depends on various factors:
...
@@ -347,7 +347,7 @@ The choice of which platform to use for a simulation depends on various factors:
(primarily the various “custom” force classes), it may be faster to use the
(primarily the various “custom” force classes), it may be faster to use the
OpenCL platform running on the CPU.
OpenCL platform running on the CPU.
#. The CUDA platform can be used with NVIDIA GPUs. For using an AMD GPU,
#. The CUDA platform can be used with NVIDIA GPUs. For using an AMD GPU,
use the HIP platform (or the OpenCL platform which is usually slower)
, f
or
use the HIP platform (or the OpenCL platform which is usually slower)
. F
or
using an Intel GPU, use the OpenCL platform.
using an Intel
or Apple
GPU, use the OpenCL platform.
#. The AMOEBA force field works with all platforms, but the performance
#. The AMOEBA force field works with all platforms, but the performance
of the Reference and CPU platforms is usually too slow to be useful.
of the Reference and CPU platforms is usually too slow to be useful.
docs-source/usersguide/library/02_compiling.rst
View file @
f48eb17b
...
@@ -56,20 +56,26 @@ changing, may contain bugs, and should never be used for production work. If
...
@@ -56,20 +56,26 @@ changing, may contain bugs, and should never be used for production work. If
you want a stable, well tested version of OpenMM, you should download the source
you want a stable, well tested version of OpenMM, you should download the source
code for the latest release as described above.
code for the latest release as described above.
CUDA
or
OpenCL Support
CUDA
,
OpenCL
, or HIP
Support
----------------------
----------------------
------
If you want to compile OpenMM with support for running on GPUs, you will need
If you want to compile OpenMM with support for running on GPUs, you will need
CUDA
and/
or OpenCL. MacOS comes with OpenCL built in, so nothing else needs to
CUDA
, HIP,
or OpenCL. MacOS comes with OpenCL built in, so nothing else needs to
be installed. For Linux, you need an appropriate SDK.
be installed. For Linux, you need an appropriate SDK.
The
easiest way is to install the
most recent CUDA Toolkit from https://developer.nvidia.com/cuda-downloads.
The most recent CUDA Toolkit
can be obtained
from https://developer.nvidia.com/cuda-downloads.
It includes the headers and libraries needed to compile both CUDA and OpenCL
It includes the headers and libraries needed to compile both CUDA and OpenCL
applications. In addition, it has runtime libraries that are needed for running
applications. In addition, it has runtime libraries that are needed for running
CUDA applications. The runtime components for OpenCL applications are included
CUDA applications. The runtime components for OpenCL applications are included
with the GPU drivers from NVIDIA, AMD, and Intel, so make sure you have an
with the GPU drivers from NVIDIA, AMD, and Intel, so make sure you have an
up-to-date driver.
up-to-date driver.
The headers and libraries needed to build the HIP platform can be installed with
conda using the following command.
::
conda install -c conda-forge hip-devel hipcc rocm-cmake rocm-device-libs
Other Required Software
Other Required Software
-----------------------
-----------------------
...
@@ -130,7 +136,7 @@ Build OpenMM with the command::
...
@@ -130,7 +136,7 @@ Build OpenMM with the command::
Step 3: Test your build
Step 3: Test your build
=======================
=======================
This step is optional but recommended. Tests can take
up to several minutes
depending on your
This step is optional but recommended. Tests can take
a while
depending on your
hardware configuration.
hardware configuration.
It is recommended that you make sure your local build of OpenMM works before trying
It is recommended that you make sure your local build of OpenMM works before trying
...
@@ -241,17 +247,21 @@ changing, may contain bugs, and should never be used for production work. If
...
@@ -241,17 +247,21 @@ changing, may contain bugs, and should never be used for production work. If
you want a stable, well tested version of OpenMM, you should download the source
you want a stable, well tested version of OpenMM, you should download the source
code for the latest release as described above.
code for the latest release as described above.
CUDA
or
OpenCL Support
CUDA
,
OpenCL
, or HIP
Support
----------------------
----------------------
------
If you want to compile OpenMM with support for running on GPUs, you will need
If you want to compile OpenMM with support for running on GPUs, you will need
CUDA and/or OpenCL. Install the most recent CUDA Toolkit from https://developer.nvidia.com/cuda-downloads.
CUDA, HIP, or OpenCL.
The most recent CUDA Toolkit can be obtained from https://developer.nvidia.com/cuda-downloads.
It includes the headers and libraries needed to compile both CUDA and OpenCL
It includes the headers and libraries needed to compile both CUDA and OpenCL
applications. In addition, it has runtime libraries that are needed for running
applications. In addition, it has runtime libraries that are needed for running
CUDA applications. The runtime components for OpenCL applications are included
CUDA applications. The runtime components for OpenCL applications are included
with the GPU drivers from NVIDIA, AMD, and Intel, so make sure you have an
with the GPU drivers from NVIDIA, AMD, and Intel, so make sure you have an
up-to-date driver.
up-to-date driver.
To build the HIP platform, install the HIP SDK from https://rocm.docs.amd.com/projects/install-on-windows.
Other Required Software
Other Required Software
-----------------------
-----------------------
...
@@ -304,6 +314,10 @@ There are several variables that can be adjusted in the CMake interface:
...
@@ -304,6 +314,10 @@ There are several variables that can be adjusted in the CMake interface:
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/include", except
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/include", except
with the correct version number for the toolkit you installed) and
with the correct version number for the toolkit you installed) and
OPENCL_LIBRARY to point to the library (usually "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64/OpenCL.lib").
OPENCL_LIBRARY to point to the library (usually "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64/OpenCL.lib").
* If you are building the HIP platform, the SDK may be found automatically. If
it is not, set HIP_DIR to "C:\AMD\ROCm\6.1\lib\cmake\hip" and HIPRTC_DIR to
"C:\AMD\ROCm\6.1\lib\cmake\hiprtc" (substituting the correct version number
for the SDK you installed).
Press "Configure" again. Adjust any variables that cause an error.
Press "Configure" again. Adjust any variables that cause an error.
...
...
docs-source/usersguide/library/04_platform_specifics.rst
View file @
f48eb17b
...
@@ -106,6 +106,12 @@ values. For example,
...
@@ -106,6 +106,12 @@ values. For example,
This tells it to use both devices 0 and 1, splitting the work between them.
This tells it to use both devices 0 and 1, splitting the work between them.
HIP Platform
************
The HIP Platform recognizes exactly the same Platform-specific properties as
the CUDA platform.
CPU Platform
CPU Platform
************
************
...
...
docs-source/usersguide/library/08_amoeba_plugin.rst
View file @
f48eb17b
...
@@ -11,9 +11,6 @@ accelerate AMOEBA simulations. TINKER-OpenMM can be created from a TINKER
...
@@ -11,9 +11,6 @@ accelerate AMOEBA simulations. TINKER-OpenMM can be created from a TINKER
package
using
three
files
made
available
through
the
OpenMM
home
page
.
OpenMM
package
using
three
files
made
available
through
the
OpenMM
home
page
.
OpenMM
AMOEBA
Force
and
System
objects
containing
AMOEBA
forces
can
be
serialized
.
AMOEBA
Force
and
System
objects
containing
AMOEBA
forces
can
be
serialized
.
At
present
,
AMOEBA
is
only
supported
on
the
CUDA
and
Reference
platforms
,
not
on
the
OpenCL
platform
.
In
the
following
sections
,
the
individual
forces
and
options
available
in
the
In
the
following
sections
,
the
individual
forces
and
options
available
in
the
plugin
are
listed
,
and
the
steps
required
to
build
and
use
the
plugin
and
plugin
are
listed
,
and
the
steps
required
to
build
and
use
the
plugin
and
TINKER
-
OpenMM
are
outlined
.
Validation
results
are
also
reported
.
Benchmarks
TINKER
-
OpenMM
are
outlined
.
Validation
results
are
also
reported
.
Benchmarks
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment