Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ebrains-spack-builds
Manage
Activity
Members
Labels
Plan
Issues
30
Issue boards
Milestones
Wiki
Code
Merge requests
30
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
ebrains-spack-builds
Merge requests
!119
create new experimental release
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
create new experimental release
master
into
experimental_rel
Overview
0
Commits
28
Pipelines
1
Changes
10
Merged
Eleni Mathioulaki
requested to merge
master
into
experimental_rel
2 years ago
Overview
0
Commits
28
Pipelines
1
Changes
10
Expand
0
0
Merge request reports
Compare
experimental_rel
experimental_rel (base)
and
latest version
latest version
73de9809
28 commits,
2 years ago
10 files
+
305
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
Search (e.g. *.vue) (Ctrl+P)
packages/hxtorch/package.py
0 → 100644
+
135
−
0
Options
# Copyright 2013-2022 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
Hxtorch
(
WafPackage
):
"""
hxtorch --- a PyTorch-based toplevel for the BrainScaleS-2 neuromorphic hardware systems
"""
homepage
=
"
https://github.com/electronicvisions/hxtorch
"
# This repo provides a waf binary used for the build below
git
=
"
https://github.com/electronicvisions/pynn-brainscales.git
"
version
(
'
2.0-rc6
'
,
branch
=
'
waf
'
)
# PPU compiler dependencies
depends_on
(
'
oppulance@2.0:
'
)
# host software dependencies
depends_on
(
'
bitsery
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
binutils+gold+ld+plugins
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# specialize
depends_on
(
'
boost@1.69.0: +graph+icu+mpi+python+numpy+coroutine+context cxxstd=17
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# specialize boost (non-clingo, type=('build', 'link', 'run'))
depends_on
(
'
cereal
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
cppcheck
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
doxygen+graphviz
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
genpybind@ebrains
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
gflags
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
googletest@1.11.0: +gmock
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# variadic templates needed
depends_on
(
'
intel-tbb
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# ppu gdbserver
depends_on
(
'
libelf
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
liblockfile
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
llvm
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
log4cxx
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
pkg-config
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
python@3.7.0:
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# BrainScaleS(-2, type=('build', 'link', 'run')) only supports Python >= 3.7
depends_on
(
'
py-h5py
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
# PyNN tests need it
depends_on
(
'
py-matplotlib
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-nose
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-numpy
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pybind11
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pybind11-stubgen
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pycodestyle
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pyelftools
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pylint
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-torch
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-pyyaml
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-scipy
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
py-sqlalchemy
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
util-linux
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
depends_on
(
'
yaml-cpp+shared
'
,
type
=
(
'
build
'
,
'
link
'
,
'
run
'
))
extends
(
'
python
'
)
def
setup_build_environment
(
self
,
env
):
"""
waf needs to find headers and libraries by itself (mostly `boost`
tool, but also `gtest`); it also needs to run executables during
configuration.
"""
include
=
[]
for
dep
in
self
.
spec
.
traverse
(
deptype
=
'
build
'
):
query
=
self
.
spec
[
dep
.
name
]
try
:
include
.
extend
(
query
.
headers
.
directories
)
print
(
'
headers:
'
,
query
.
headers
.
directories
,
"
\n
"
)
except
:
pass
library
=
[]
for
dep
in
self
.
spec
.
traverse
(
deptype
=
(
'
link
'
,
'
run
'
)):
query
=
self
.
spec
[
dep
.
name
]
try
:
library
.
extend
(
query
.
libs
.
directories
)
print
(
'
libs:
'
,
query
.
libs
.
directories
,
"
\n
"
)
except
:
pass
path
=
[]
for
dep
in
self
.
spec
.
traverse
(
deptype
=
(
'
build
'
,
'
link
'
,
'
run
'
)):
query
=
self
.
spec
[
dep
.
name
]
try
:
path
.
append
(
query
.
prefix
.
bin
)
print
(
'
bin:
'
,
query
.
prefix
.
bin
,
"
\n
"
)
except
:
pass
# llvm might be built with ~shared_libs but still builds shared libs
if
not
any
(
'
llvm
'
in
lib
for
lib
in
library
):
library
.
append
(
self
.
spec
[
'
llvm
'
].
prefix
.
lib
)
env
.
set
(
'
CPATH
'
,
'
:
'
.
join
(
include
))
env
.
set
(
'
C_INCLUDE_PATH
'
,
'
:
'
.
join
(
include
))
env
.
set
(
'
CPLUS_INCLUDE_PATH
'
,
'
:
'
.
join
(
include
))
env
.
set
(
'
LIBRARY_PATH
'
,
'
:
'
.
join
(
library
))
env
.
set
(
'
LD_LIBRARY_PATH
'
,
'
:
'
.
join
(
library
))
env
.
prepend_path
(
'
PATH
'
,
'
:
'
.
join
(
path
))
def
setup_run_environment
(
self
,
env
):
env
.
prepend_path
(
'
PYTHONPATH
'
,
self
.
prefix
.
lib
)
# override configure step as we perform a project setup first
def
configure
(
self
,
spec
,
prefix
):
"""
Setup and configure the project.
"""
self
.
waf
(
'
setup
'
,
'
--repo-db-url=https://github.com/electronicvisions/projects
'
,
'
--without-munge
'
,
'
--project=hxtorch@ebrains-
'
+
str
(
spec
.
version
),
'
--project=haldls@ebrains-
'
+
str
(
spec
.
version
),
'
--project=grenade@ebrains-
'
+
str
(
spec
.
version
),
'
--project=code-format@ebrains-
'
+
str
(
spec
.
version
),
'
--project=logger@ebrains-
'
+
str
(
spec
.
version
),
'
--project=halco@ebrains-
'
+
str
(
spec
.
version
),
'
--project=hate@ebrains-
'
+
str
(
spec
.
version
),
'
--project=fisch@ebrains-
'
+
str
(
spec
.
version
),
'
--project=ztl@ebrains-
'
+
str
(
spec
.
version
),
'
--project=hxcomm@ebrains-
'
+
str
(
spec
.
version
),
'
--project=rant@ebrains-
'
+
str
(
spec
.
version
),
'
--project=pywrap@ebrains-
'
+
str
(
spec
.
version
),
'
--project=lib-boost-patches@ebrains-
'
+
str
(
spec
.
version
),
'
--project=sctrltp@ebrains-
'
+
str
(
spec
.
version
),
'
--project=hwdb@ebrains-
'
+
str
(
spec
.
version
),
'
--project=visions-slurm@ebrains-
'
+
str
(
spec
.
version
),
'
--project=flange@ebrains-
'
+
str
(
spec
.
version
),
'
--project=lib-rcf@ebrains-
'
+
str
(
spec
.
version
),
'
--project=bss-hw-params@ebrains-
'
+
str
(
spec
.
version
),
'
--project=libnux@ebrains-
'
+
str
(
spec
.
version
)
)
args
=
[
'
--prefix={0}
'
.
format
(
self
.
prefix
)]
args
+=
self
.
configure_args
()
self
.
waf
(
'
configure
'
,
*
args
)
def
build_args
(
self
):
args
=
[
'
--keep
'
,
'
--test-execnone
'
,
'
-v
'
]
return
args