Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
c566a610
Commit
c566a610
authored
5 years ago
by
Glenn Johnson
Committed by
Peter Scheibel
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
New package: gpu-burn (#13108)
parent
cfbac14c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
var/spack/repos/builtin/packages/gpu-burn/Makefile.patch
+18
-0
18 additions, 0 deletions
var/spack/repos/builtin/packages/gpu-burn/Makefile.patch
var/spack/repos/builtin/packages/gpu-burn/package.py
+55
-0
55 additions, 0 deletions
var/spack/repos/builtin/packages/gpu-burn/package.py
with
73 additions
and
0 deletions
var/spack/repos/builtin/packages/gpu-burn/Makefile.patch
0 → 100644
+
18
−
0
View file @
c566a610
--- a/Makefile 2018-12-08 05:36:48.000000000 -0600
+++ b/Makefile 2019-10-04 13:08:37.095337704 -0500
@@ -1,12 +1,6 @@
-CUDAPATH=/usr/local/cuda
-
-# Have this point to an old enough gcc (for nvcc)
-GCCPATH=/usr
-
NVCC=nvcc
-CCPATH=${GCCPATH}/bin
drv:
- PATH=${PATH}:.:${CCPATH}:${PATH} ${NVCC} -I${CUDAPATH}/include -arch=compute_30 -ptx compare.cu -o compare.ptx
- g++ -O3 -Wno-unused-result -I${CUDAPATH}/include -c gpu_burn-drv.cpp
- g++ -o gpu_burn gpu_burn-drv.o -O3 -lcuda -L${CUDAPATH}/lib64 -L${CUDAPATH}/lib -Wl,-rpath=${CUDAPATH}/lib64 -Wl,-rpath=${CUDAPATH}/lib -lcublas -lcudart -o gpu_burn
+ ${NVCC} -arch=compute_30 -ptx compare.cu -o compare.ptx
+ g++ -O3 -Wno-unused-result -c gpu_burn-drv.cpp
+ g++ -o gpu_burn gpu_burn-drv.o -O3 -lcuda -lcublas -lcudart -o gpu_burn
This diff is collapsed.
Click to expand it.
var/spack/repos/builtin/packages/gpu-burn/package.py
0 → 100644
+
55
−
0
View file @
c566a610
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from
spack
import
*
class
GpuBurn
(
MakefilePackage
,
CudaPackage
):
"""
Multi-GPU CUDA stress test. Note that the file pointed to by COMPARE_PTX
needs to be copied or linked to the current working directory before
running gpu_burn.
"""
homepage
=
"
http://wili.cc/blog/gpu-burn.html
"
url
=
"
http://wili.cc/blog/entries/gpu-burn/gpu_burn-1.0.tar.gz
"
version
(
'
1.0
'
,
sha256
=
'
d55994f0bee8dabf021966dbe574ef52be1e43386faeee91318dd4ebb36aa74a
'
)
patch
(
'
Makefile.patch
'
)
# This package uses CudaPackage to pick up the cuda_arch variant. A side
# effect is that it also picks up the cuda variant, but cuda is required
# for gpu-burn so is not really a variant.
variant
(
'
cuda
'
,
'
True
'
,
description
=
'
Use CUDA; must be true
'
)
conflicts
(
'
~cuda
'
,
msg
=
'
gpu-burn requires cuda
'
)
def
edit
(
self
,
spec
,
prefix
):
# update cuda architecture if necessary
if
'
+cuda
'
in
self
.
spec
:
cuda_arch
=
self
.
spec
.
variants
[
'
cuda_arch
'
].
value
archflag
=
''
if
cuda_arch
!=
'
none
'
:
if
len
(
cuda_arch
)
>
1
:
raise
InstallError
(
'
gpu-burn only supports compilation for a single GPU
'
'
type.
'
)
archflag
=
'
-arch=compute_{0}
'
.
format
(
cuda_arch
[
0
])
filter_file
(
'
-arch=compute_30
'
,
archflag
,
'
Makefile
'
,
string
=
True
)
def
install
(
self
,
spec
,
prefix
):
mkdir
(
prefix
.
bin
)
mkdir
(
prefix
.
share
)
install
(
'
gpu_burn
'
,
prefix
.
bin
)
install
(
'
compare.ptx
'
,
prefix
.
share
)
# The gpu_burn program looks for the compare.ptx file in the current
# working directory. Create an environment variable that can be pointed to
# so that it can be copied or linked.
def
setup_environment
(
self
,
spack_env
,
run_env
):
run_env
.
set
(
'
COMPARE_PTX
'
,
join_path
(
self
.
prefix
.
share
,
'
compare.ptx
'
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment