Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torchani
Commits
0731668c
Unverified
Commit
0731668c
authored
Jan 29, 2020
by
Gao, Xiang
Committed by
GitHub
Jan 29, 2020
Browse files
nvidia profiling for md (#411)
* nvidia profiling for md * 1 model
parent
2de2ecbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
tools/md-benchmark-nsys-profile.py
tools/md-benchmark-nsys-profile.py
+24
-0
No files found.
tools/md-benchmark-nsys-profile.py
0 → 100644
View file @
0731668c
import
ase
import
ase.io
import
ase.md
import
argparse
import
torchani
import
autonvtx
import
torch
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'filename'
,
help
=
"file for the molecule"
)
args
=
parser
.
parse_args
()
molecule
=
ase
.
io
.
read
(
args
.
filename
)
model
=
torchani
.
models
.
ANI1x
()[
0
].
cuda
()
calculator
=
model
.
ase
()
molecule
.
set_calculator
(
calculator
)
dyn
=
ase
.
md
.
verlet
.
VelocityVerlet
(
molecule
,
timestep
=
1
*
ase
.
units
.
fs
)
dyn
.
run
(
1000
)
# warm up
torch
.
cuda
.
cudart
().
cudaProfilerStart
()
autonvtx
(
model
)
with
torch
.
autograd
.
profiler
.
emit_nvtx
(
record_shapes
=
True
):
dyn
.
run
(
10
)
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