harmonize-python 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- harmonize_python-0.1.0/.github/dependabot.yml +13 -0
- harmonize_python-0.1.0/.github/workflows/docs.yml +68 -0
- harmonize_python-0.1.0/.github/workflows/release.yml +88 -0
- harmonize_python-0.1.0/.github/workflows/tests.yml +73 -0
- harmonize_python-0.1.0/.gitignore +24 -0
- harmonize_python-0.1.0/CHANGELOG.md +66 -0
- harmonize_python-0.1.0/CITATION.cff +38 -0
- harmonize_python-0.1.0/CODE_OF_CONDUCT.md +133 -0
- harmonize_python-0.1.0/CONTRIBUTING.md +71 -0
- harmonize_python-0.1.0/LICENSE +29 -0
- harmonize_python-0.1.0/PKG-INFO +161 -0
- harmonize_python-0.1.0/README.md +130 -0
- harmonize_python-0.1.0/SECURITY.md +11 -0
- harmonize_python-0.1.0/docs/.gitignore +1 -0
- harmonize_python-0.1.0/docs/README.md +61 -0
- harmonize_python-0.1.0/docs/build.sh +38 -0
- harmonize_python-0.1.0/docs/conf.py +54 -0
- harmonize_python-0.1.0/docs/cpp-api.md +17 -0
- harmonize_python-0.1.0/docs/doxygen/Doxyfile +36 -0
- harmonize_python-0.1.0/docs/doxygen/doxygen-awesome/LICENSE +21 -0
- harmonize_python-0.1.0/docs/doxygen/doxygen-awesome/doxygen-awesome-sidebar-only.css +106 -0
- harmonize_python-0.1.0/docs/doxygen/doxygen-awesome/doxygen-awesome.css +3053 -0
- harmonize_python-0.1.0/docs/doxygen/mainpage.md +10 -0
- harmonize_python-0.1.0/docs/index.md +112 -0
- harmonize_python-0.1.0/docs/installation.md +79 -0
- harmonize_python-0.1.0/docs/python-api.md +56 -0
- harmonize_python-0.1.0/docs/requirements.txt +7 -0
- harmonize_python-0.1.0/examples/cpp/barrier_demo/Makefile +24 -0
- harmonize_python-0.1.0/examples/cpp/barrier_demo/demo.cpp +230 -0
- harmonize_python-0.1.0/examples/cpp/collaz/Makefile +32 -0
- harmonize_python-0.1.0/examples/cpp/collaz/collaz_hrm.cpp +249 -0
- harmonize_python-0.1.0/examples/cpp/collaz/collaz_std.cpp +93 -0
- harmonize_python-0.1.0/examples/cpp/example_neutron/Makefile +37 -0
- harmonize_python-0.1.0/examples/cpp/example_neutron/logic.cpp +252 -0
- harmonize_python-0.1.0/examples/cpp/example_neutron/program.cpp +394 -0
- harmonize_python-0.1.0/examples/cpp/work_in_progress/async_load_demo/Makefile +30 -0
- harmonize_python-0.1.0/examples/cpp/work_in_progress/async_load_demo/bench.sh +39 -0
- harmonize_python-0.1.0/examples/cpp/work_in_progress/async_load_demo/demo.cpp +270 -0
- harmonize_python-0.1.0/examples/python/collaz/collaz.py +183 -0
- harmonize_python-0.1.0/harmonize/__init__.py +65 -0
- harmonize_python-0.1.0/harmonize/__main__.py +39 -0
- harmonize_python-0.1.0/harmonize/adapt.py +105 -0
- harmonize_python-0.1.0/harmonize/array.py +588 -0
- harmonize_python-0.1.0/harmonize/atomics.py +206 -0
- harmonize_python-0.1.0/harmonize/codegen.py +409 -0
- harmonize_python-0.1.0/harmonize/config.py +220 -0
- harmonize_python-0.1.0/harmonize/cpp/async/future.h +64 -0
- harmonize_python-0.1.0/harmonize/cpp/async/mod.h +9 -0
- harmonize_python-0.1.0/harmonize/cpp/async/promise.h +747 -0
- harmonize_python-0.1.0/harmonize/cpp/harmonize.h +4 -0
- harmonize_python-0.1.0/harmonize/cpp/mem/mod.h +14 -0
- harmonize_python-0.1.0/harmonize/cpp/mem/work.h +168 -0
- harmonize_python-0.1.0/harmonize/cpp/preamble/adapt.h +162 -0
- harmonize_python-0.1.0/harmonize/cpp/preamble/mod.h +133 -0
- harmonize_python-0.1.0/harmonize/cpp/program/async.h +2923 -0
- harmonize_python-0.1.0/harmonize/cpp/program/event.h +560 -0
- harmonize_python-0.1.0/harmonize/cpp/program/mod.h +84 -0
- harmonize_python-0.1.0/harmonize/cpp/sync/barrier.h +704 -0
- harmonize_python-0.1.0/harmonize/cpp/sync/mod.h +9 -0
- harmonize_python-0.1.0/harmonize/cpp/util/cli.h +510 -0
- harmonize_python-0.1.0/harmonize/cpp/util/host.h +287 -0
- harmonize_python-0.1.0/harmonize/cpp/util/iter.h +565 -0
- harmonize_python-0.1.0/harmonize/cpp/util/mem.h +1050 -0
- harmonize_python-0.1.0/harmonize/cpp/util/mod.h +148 -0
- harmonize_python-0.1.0/harmonize/diagnostics.py +487 -0
- harmonize_python-0.1.0/harmonize/errors.py +12 -0
- harmonize_python-0.1.0/harmonize/logging.py +51 -0
- harmonize_python-0.1.0/harmonize/pointer.py +108 -0
- harmonize_python-0.1.0/harmonize/prim.py +59 -0
- harmonize_python-0.1.0/harmonize/printing.py +104 -0
- harmonize_python-0.1.0/harmonize/python/__init__.py +48 -0
- harmonize_python-0.1.0/harmonize/runtime.py +1501 -0
- harmonize_python-0.1.0/harmonize/templates.py +369 -0
- harmonize_python-0.1.0/harmonize/timing.py +10 -0
- harmonize_python-0.1.0/harmonize/types.py +16 -0
- harmonize_python-0.1.0/pyproject.toml +67 -0
- harmonize_python-0.1.0/tests/README.md +35 -0
- harmonize_python-0.1.0/tests/conftest.py +64 -0
- harmonize_python-0.1.0/tests/programs/collatz.py +152 -0
- harmonize_python-0.1.0/tests/test_cpp_examples.py +40 -0
- harmonize_python-0.1.0/tests/test_package_layout.py +65 -0
- harmonize_python-0.1.0/tests/test_programs.py +32 -0
- harmonize_python-0.1.0/tests/test_version.py +30 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Documentation
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Builds the documentation site (docs/build.sh) on every pull request and push
|
|
5
|
+
# to main, and publishes it to GitHub Pages from main only.
|
|
6
|
+
#
|
|
7
|
+
# Publishing requires Settings -> Pages -> Source: "GitHub Actions".
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
name: Documentation
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: [main]
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
build:
|
|
27
|
+
runs-on: ubuntu-24.04
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v7
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v7
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
cache: pip
|
|
35
|
+
cache-dependency-path: docs/requirements.txt
|
|
36
|
+
|
|
37
|
+
# Sphinx imports harmonize to read its docstrings; no GPU is needed.
|
|
38
|
+
- name: Install Doxygen, Harmonize, and the Sphinx tools
|
|
39
|
+
run: |
|
|
40
|
+
sudo apt-get update
|
|
41
|
+
sudo apt-get install --yes --no-install-recommends doxygen
|
|
42
|
+
python -m pip install . -r docs/requirements.txt
|
|
43
|
+
|
|
44
|
+
- name: Build the site
|
|
45
|
+
run: docs/build.sh
|
|
46
|
+
|
|
47
|
+
- name: Upload the site
|
|
48
|
+
uses: actions/upload-pages-artifact@v5
|
|
49
|
+
with:
|
|
50
|
+
path: docs/_build/html
|
|
51
|
+
|
|
52
|
+
publish:
|
|
53
|
+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
|
54
|
+
needs: build
|
|
55
|
+
runs-on: ubuntu-24.04
|
|
56
|
+
permissions:
|
|
57
|
+
pages: write
|
|
58
|
+
id-token: write
|
|
59
|
+
environment:
|
|
60
|
+
name: github-pages
|
|
61
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
62
|
+
concurrency:
|
|
63
|
+
group: pages
|
|
64
|
+
cancel-in-progress: false
|
|
65
|
+
steps:
|
|
66
|
+
- name: Publish to GitHub Pages
|
|
67
|
+
id: deployment
|
|
68
|
+
uses: actions/deploy-pages@v5
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Release
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Publishing a GitHub release builds the sdist and wheel and uploads them to
|
|
5
|
+
# PyPI. Running this workflow by hand uploads them to TestPyPI instead, as a
|
|
6
|
+
# dry run. See CONTRIBUTING.md, "Making a release".
|
|
7
|
+
#
|
|
8
|
+
# Uploads use PyPI's trusted publishing, so no token is stored. PyPI trusts
|
|
9
|
+
# this file by its name (release.yml) and by the environment names below
|
|
10
|
+
# (pypi, testpypi): renaming any of them breaks uploads until PyPI's settings
|
|
11
|
+
# are updated to match. CONTRIBUTING.md, "Release configuration", lists what is
|
|
12
|
+
# configured outside this repository.
|
|
13
|
+
# =============================================================================
|
|
14
|
+
|
|
15
|
+
name: Release
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
release:
|
|
19
|
+
types: [published]
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
build:
|
|
27
|
+
runs-on: ubuntu-24.04
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v7
|
|
30
|
+
with:
|
|
31
|
+
# Full history, to check that a release's commit is on main
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-python@v7
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
|
|
38
|
+
- name: Build the sdist and wheel
|
|
39
|
+
run: |
|
|
40
|
+
python -m pip install --upgrade pip build twine
|
|
41
|
+
python -m build
|
|
42
|
+
python -m twine check --strict dist/*
|
|
43
|
+
|
|
44
|
+
- name: Check that the release tag matches the version
|
|
45
|
+
if: github.event_name == 'release'
|
|
46
|
+
env:
|
|
47
|
+
TAG: ${{ github.event.release.tag_name }}
|
|
48
|
+
run: |
|
|
49
|
+
version=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
|
|
50
|
+
if [ "$TAG" != "v$version" ]; then
|
|
51
|
+
echo "::error::Release tag $TAG does not match the version in pyproject.toml (v$version)"
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
- name: Check that the release commit is on main
|
|
56
|
+
if: github.event_name == 'release'
|
|
57
|
+
run: |
|
|
58
|
+
if ! git merge-base --is-ancestor HEAD origin/main; then
|
|
59
|
+
echo "::error::The release tag points to $(git rev-parse --short HEAD), which is not on main"
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
- uses: actions/upload-artifact@v7
|
|
64
|
+
with:
|
|
65
|
+
name: dist
|
|
66
|
+
path: dist/
|
|
67
|
+
if-no-files-found: error
|
|
68
|
+
|
|
69
|
+
publish:
|
|
70
|
+
needs: build
|
|
71
|
+
runs-on: ubuntu-24.04
|
|
72
|
+
environment:
|
|
73
|
+
name: ${{ github.event_name == 'release' && 'pypi' || 'testpypi' }}
|
|
74
|
+
url: ${{ github.event_name == 'release' && 'https://pypi.org/p/harmonize-python' || 'https://test.pypi.org/p/harmonize-python' }}
|
|
75
|
+
permissions:
|
|
76
|
+
id-token: write
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/download-artifact@v8
|
|
79
|
+
with:
|
|
80
|
+
name: dist
|
|
81
|
+
path: dist/
|
|
82
|
+
|
|
83
|
+
- name: Upload to ${{ github.event_name == 'release' && 'PyPI' || 'TestPyPI' }}
|
|
84
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
85
|
+
with:
|
|
86
|
+
repository-url: ${{ github.event_name == 'release' && 'https://upload.pypi.org/legacy/' || 'https://test.pypi.org/legacy/' }}
|
|
87
|
+
# TestPyPI also refuses to replace a version, so repeated dry runs skip it
|
|
88
|
+
skip-existing: ${{ github.event_name != 'release' }}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# Tests
|
|
3
|
+
# =============================================================================
|
|
4
|
+
# Builds the sdist and wheel, installs the wheel, and runs the tests that need
|
|
5
|
+
# no GPU, on the oldest and newest supported Python, one per CUDA extra.
|
|
6
|
+
#
|
|
7
|
+
# Only CUDA 13's pip packages include nvcc, so the C++ examples compile in the
|
|
8
|
+
# CUDA 13 job; in the CUDA 12 job those tests skip. The GPU tests
|
|
9
|
+
# (tests/test_programs.py) skip here; see tests/README.md.
|
|
10
|
+
# =============================================================================
|
|
11
|
+
|
|
12
|
+
name: Tests
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [main]
|
|
17
|
+
pull_request:
|
|
18
|
+
workflow_dispatch:
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
test:
|
|
29
|
+
name: Python ${{ matrix.python }}, CUDA ${{ matrix.cuda }}
|
|
30
|
+
runs-on: ubuntu-24.04
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
include:
|
|
35
|
+
- python: "3.10"
|
|
36
|
+
cuda: "12"
|
|
37
|
+
pytest-options: ""
|
|
38
|
+
- python: "3.14"
|
|
39
|
+
cuda: "13"
|
|
40
|
+
pytest-options: --require nvcc
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v7
|
|
44
|
+
|
|
45
|
+
- uses: actions/setup-python@v7
|
|
46
|
+
with:
|
|
47
|
+
python-version: ${{ matrix.python }}
|
|
48
|
+
cache: pip
|
|
49
|
+
cache-dependency-path: pyproject.toml
|
|
50
|
+
|
|
51
|
+
- name: Build the sdist and wheel
|
|
52
|
+
run: |
|
|
53
|
+
python -m pip install --upgrade pip build
|
|
54
|
+
python -m build
|
|
55
|
+
|
|
56
|
+
# cuda-toolkit[nvcc] resolves together with Numba's CUDA packages, so
|
|
57
|
+
# nvcc and Numba's NVVM come from the same CUDA release and nvcc can
|
|
58
|
+
# assemble the PTX that NVVM emits.
|
|
59
|
+
- name: Install the wheel, CUDA ${{ matrix.cuda }}, and pytest
|
|
60
|
+
run: |
|
|
61
|
+
wheel=$(ls dist/*.whl)
|
|
62
|
+
python -m pip install "$wheel[cuda${{ matrix.cuda }}]" \
|
|
63
|
+
"cuda-toolkit[nvcc]==${{ matrix.cuda }}.*" pytest
|
|
64
|
+
nvcc=$(python -c 'import glob, nvidia; print(*glob.glob(nvidia.__path__[0] + "/*/bin/nvcc"))')
|
|
65
|
+
if [ -n "$nvcc" ]; then
|
|
66
|
+
dirname "$nvcc" >> "$GITHUB_PATH"
|
|
67
|
+
fi
|
|
68
|
+
python -m pip list
|
|
69
|
+
|
|
70
|
+
# `pytest`, not `python -m pytest`, so the tests import the installed
|
|
71
|
+
# wheel rather than the checkout (the report header shows which).
|
|
72
|
+
- name: Test
|
|
73
|
+
run: pytest -v ${{ matrix.pytest-options }} tests
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.vscode/
|
|
2
|
+
|
|
3
|
+
# Executables built by the example Makefiles (the others end in .exe)
|
|
4
|
+
examples/cpp/work_in_progress/async_load_demo/demo
|
|
5
|
+
|
|
6
|
+
*.exe
|
|
7
|
+
*.so
|
|
8
|
+
*.ptx
|
|
9
|
+
*.pyc
|
|
10
|
+
*.core
|
|
11
|
+
*.ll
|
|
12
|
+
*.bc
|
|
13
|
+
*.o
|
|
14
|
+
|
|
15
|
+
__pycache__/
|
|
16
|
+
__ptxcache__/
|
|
17
|
+
__harmonize_cache__/
|
|
18
|
+
|
|
19
|
+
build/
|
|
20
|
+
dist/
|
|
21
|
+
*.egg-info/
|
|
22
|
+
|
|
23
|
+
CMakeLists.txt
|
|
24
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable changes to Harmonize. Versions follow [semantic versioning](https://semver.org/);
|
|
4
|
+
before 1.0, a minor version (0.x.0) may include breaking changes.
|
|
5
|
+
|
|
6
|
+
## 0.1.0 (2026-11-18)
|
|
7
|
+
|
|
8
|
+
### Changed (breaking)
|
|
9
|
+
|
|
10
|
+
- Harmonize is published on PyPI as `harmonize-python`; it is still imported as
|
|
11
|
+
`harmonize`. (The PyPI project named `harmonize` is unrelated.)
|
|
12
|
+
- The Python modules moved from `harmonize.python` into `harmonize` (for
|
|
13
|
+
example, `harmonize.config` instead of `harmonize.python.config`), and the
|
|
14
|
+
public API is importable from `harmonize` directly. The old names still work,
|
|
15
|
+
as the same modules, but `import harmonize.python` raises a
|
|
16
|
+
`DeprecationWarning`; they will be removed in a future release.
|
|
17
|
+
- Requires Python 3.10 or newer.
|
|
18
|
+
- GPU backends are installed as extras: `harmonize-python[cuda13]` or
|
|
19
|
+
`harmonize-python[cuda12]`. For AMD GPUs, `numba-hip` is installed separately
|
|
20
|
+
for your ROCm release.
|
|
21
|
+
- The GPU platform is chosen once, at import. Set `HARMONIZE_PLATFORM` to
|
|
22
|
+
`cuda` or `rocm` to require one; the default, `auto`, prefers ROCm when its
|
|
23
|
+
Numba backend is installed.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- `python -m harmonize info` reports the platform, toolchain, and GPUs, and
|
|
28
|
+
`python -m harmonize check` diagnoses common setup problems, including an nvcc
|
|
29
|
+
too old to assemble the PTX that Numba's NVVM emits.
|
|
30
|
+
- `harmonize.get_include()` returns the directory of the C++ headers, and
|
|
31
|
+
`harmonize.__version__` the installed version.
|
|
32
|
+
- Host/device memory functions: `alloc_device_bytes`, `alloc_managed_bytes`,
|
|
33
|
+
`free_device_bytes`, `memcpy_host_to_device`, `memcpy_device_to_host`, and
|
|
34
|
+
`array_from_ptr`, with refined pointer utilities in `harmonize.pointer`.
|
|
35
|
+
- `get_wall_clock()`, a wall-clock builtin for device code.
|
|
36
|
+
- State load and store functions accept CPU states that are either record
|
|
37
|
+
objects or arrays.
|
|
38
|
+
- A [documentation site](https://harmonize-software.github.io/harmonize/) with
|
|
39
|
+
guides and the Python and C++ API references.
|
|
40
|
+
- Tests, run in CI on every pull request.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- `memcpy_device_to_host` used the wrong copy direction, and the Python
|
|
45
|
+
memcpy functions copied too few bytes for multidimensional arrays.
|
|
46
|
+
- ROCm: device code is compiled to object files and linked with
|
|
47
|
+
`llvm-link --override`, which resolves multiply-defined symbols; builds
|
|
48
|
+
pass ROCm 7.1's stricter checks.
|
|
49
|
+
- The `barrier_demo` C++ example compiles against the current headers.
|
|
50
|
+
|
|
51
|
+
### Removed
|
|
52
|
+
|
|
53
|
+
- `install.sh`; see the installation section of the README.
|
|
54
|
+
|
|
55
|
+
## 0.0.2 (2024-10-31)
|
|
56
|
+
|
|
57
|
+
- AMD GPU support through `numba-hip`, with CUDA/HIP adapters, AMD-friendly
|
|
58
|
+
atomics, and multi-field states.
|
|
59
|
+
- Event-mode status flags, with a Python wrapper; separate binding and loading
|
|
60
|
+
steps; a setting to disable or force compilation.
|
|
61
|
+
- `local_array`, a `select_device` builtin, and import checks.
|
|
62
|
+
- Verbose printing is off by default.
|
|
63
|
+
|
|
64
|
+
## 0.0.1 (2024-04-20)
|
|
65
|
+
|
|
66
|
+
- First release, with the Python package structure.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This CITATION.cff file was generated with cffinit.
|
|
2
|
+
# Visit https://bit.ly/cffinit to generate yours today!
|
|
3
|
+
|
|
4
|
+
cff-version: 1.2.0
|
|
5
|
+
title: 'harmonize'
|
|
6
|
+
message: >-
|
|
7
|
+
An asynchronous GPU scheduler for decreasing thread divergence on GPU
|
|
8
|
+
type: software
|
|
9
|
+
authors:
|
|
10
|
+
- name: >-
|
|
11
|
+
Center for Exascale Monte Carlo Neutron Transport
|
|
12
|
+
(CEMeNT)
|
|
13
|
+
website: 'https://cement-psaap.github.io/'
|
|
14
|
+
- given-names: Braxton
|
|
15
|
+
family-names: Cuneo
|
|
16
|
+
email: bcuneo@seattleu.edu
|
|
17
|
+
affiliation: Seattle University
|
|
18
|
+
orcid: 'https://orcid.org/0000-0002-6493-0990'
|
|
19
|
+
- given-names: Joanna Piper
|
|
20
|
+
family-names: Morgan
|
|
21
|
+
email: morgajoa@oregonstate.edu
|
|
22
|
+
affiliation: Oregon State University
|
|
23
|
+
orcid: 'https://orcid.org/0000-0003-1379-5431'
|
|
24
|
+
identifiers:
|
|
25
|
+
- type: doi
|
|
26
|
+
value: 10.1145/3626957
|
|
27
|
+
description: Divergence Reduction in Monte Carlo Neutron Transport with On-GPU Asynchronous Scheduling
|
|
28
|
+
repository-code: 'https://github.com/harmonize-software/harmonize'
|
|
29
|
+
abstract: >-
|
|
30
|
+
An asynchronous GPU scheduler for decreasing thread divergence on GPU
|
|
31
|
+
keywords:
|
|
32
|
+
- gpu
|
|
33
|
+
- cuda
|
|
34
|
+
- hip
|
|
35
|
+
- scheduler
|
|
36
|
+
license: BSD-3-Clause
|
|
37
|
+
version: 0.1.0
|
|
38
|
+
date-released: '2026-11-18'
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
# Contributor Covenant Code of Conduct
|
|
3
|
+
|
|
4
|
+
## Our Pledge
|
|
5
|
+
|
|
6
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
7
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
9
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
10
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
11
|
+
identity and orientation.
|
|
12
|
+
|
|
13
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
14
|
+
diverse, inclusive, and healthy community.
|
|
15
|
+
|
|
16
|
+
## Our Standards
|
|
17
|
+
|
|
18
|
+
Examples of behavior that contributes to a positive environment for our
|
|
19
|
+
community include:
|
|
20
|
+
|
|
21
|
+
* Demonstrating empathy and kindness toward other people
|
|
22
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
23
|
+
* Giving and gracefully accepting constructive feedback
|
|
24
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
25
|
+
and learning from the experience
|
|
26
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
27
|
+
community
|
|
28
|
+
|
|
29
|
+
Examples of unacceptable behavior include:
|
|
30
|
+
|
|
31
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
32
|
+
any kind
|
|
33
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
34
|
+
* Public or private harassment
|
|
35
|
+
* Publishing others' private information, such as a physical or email address,
|
|
36
|
+
without their explicit permission
|
|
37
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
38
|
+
professional setting
|
|
39
|
+
|
|
40
|
+
## Enforcement Responsibilities
|
|
41
|
+
|
|
42
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
43
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
44
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
45
|
+
or harmful.
|
|
46
|
+
|
|
47
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
48
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
49
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
50
|
+
decisions when appropriate.
|
|
51
|
+
|
|
52
|
+
## Scope
|
|
53
|
+
|
|
54
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
55
|
+
an individual is officially representing the community in public spaces.
|
|
56
|
+
Examples of representing our community include using an official email address,
|
|
57
|
+
posting via an official social media account, or acting as an appointed
|
|
58
|
+
representative at an online or offline event.
|
|
59
|
+
|
|
60
|
+
## Enforcement
|
|
61
|
+
|
|
62
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
63
|
+
reported to the community leaders responsible for enforcement at
|
|
64
|
+
harmonize-software@gmail.com.
|
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
66
|
+
|
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
+
reporter of any incident.
|
|
69
|
+
|
|
70
|
+
## Enforcement Guidelines
|
|
71
|
+
|
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
74
|
+
|
|
75
|
+
### 1. Correction
|
|
76
|
+
|
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
78
|
+
unprofessional or unwelcome in the community.
|
|
79
|
+
|
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
|
83
|
+
|
|
84
|
+
### 2. Warning
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A violation through a single incident or series of
|
|
87
|
+
actions.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
93
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
94
|
+
ban.
|
|
95
|
+
|
|
96
|
+
### 3. Temporary Ban
|
|
97
|
+
|
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
|
99
|
+
sustained inappropriate behavior.
|
|
100
|
+
|
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
+
communication with the community for a specified period of time. No public or
|
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
+
Violating these terms may lead to a permanent ban.
|
|
106
|
+
|
|
107
|
+
### 4. Permanent Ban
|
|
108
|
+
|
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
112
|
+
|
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
114
|
+
community.
|
|
115
|
+
|
|
116
|
+
## Attribution
|
|
117
|
+
|
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
119
|
+
version 2.1, available at
|
|
120
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
121
|
+
|
|
122
|
+
Community Impact Guidelines were inspired by
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
124
|
+
|
|
125
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
126
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
127
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
128
|
+
|
|
129
|
+
[homepage]: https://www.contributor-covenant.org
|
|
130
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
131
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
132
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
133
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Contributing to Harmonize
|
|
2
|
+
|
|
3
|
+
Thank you for helping. Bug reports, questions, documentation fixes, and code
|
|
4
|
+
are all welcome.
|
|
5
|
+
|
|
6
|
+
## Reporting a problem
|
|
7
|
+
|
|
8
|
+
Open an [issue](https://github.com/harmonize-software/harmonize/issues). For
|
|
9
|
+
problems building or running on a GPU, include the output of
|
|
10
|
+
`python -m harmonize info` and `python -m harmonize check`. To report a
|
|
11
|
+
security problem, follow [SECURITY.md](SECURITY.md) instead.
|
|
12
|
+
|
|
13
|
+
## Setting up
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
git clone https://github.com/harmonize-software/harmonize.git
|
|
17
|
+
cd harmonize
|
|
18
|
+
pip install -e ".[cuda13]" pytest # or .[cuda12]; see the README for AMD
|
|
19
|
+
python -m harmonize check
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Making a change
|
|
23
|
+
|
|
24
|
+
- Branch from `main` and open a pull request against it.
|
|
25
|
+
- Prefer several small commits, each of which builds and passes the tests,
|
|
26
|
+
over one large one. Describe in each commit message what changed and why.
|
|
27
|
+
- Run the tests (see [tests/README.md](tests/README.md)). CI runs those that
|
|
28
|
+
need no GPU on every pull request. If you changed the runtime, the code
|
|
29
|
+
generator, or the C++ headers, also run the GPU tests and say so in the pull
|
|
30
|
+
request:
|
|
31
|
+
```sh
|
|
32
|
+
pytest --require nvcc --require gpu tests
|
|
33
|
+
```
|
|
34
|
+
- New public Python names go in `harmonize/__init__.py`'s `__all__`, with
|
|
35
|
+
NumPy-style docstrings, and in `docs/python-api.md`. See
|
|
36
|
+
[docs/README.md](docs/README.md) for writing and building the documentation.
|
|
37
|
+
|
|
38
|
+
By contributing, you agree that your contributions are licensed under the
|
|
39
|
+
project's [BSD 3-Clause License](LICENSE). Everyone taking part is expected to
|
|
40
|
+
follow the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
41
|
+
|
|
42
|
+
## Making a release
|
|
43
|
+
|
|
44
|
+
For maintainers. The version is set in `pyproject.toml`; the tests check that
|
|
45
|
+
`CITATION.cff` and `CHANGELOG.md` match it.
|
|
46
|
+
|
|
47
|
+
1. In a pull request, set the new version in `pyproject.toml` and in
|
|
48
|
+
`CITATION.cff` (with `date-released`), and rename the changelog's
|
|
49
|
+
"Unreleased" section to the version and the release date. Merge it.
|
|
50
|
+
2. Optionally, do a dry run: Actions -> Release -> Run workflow uploads the
|
|
51
|
+
build to [TestPyPI](https://test.pypi.org/p/harmonize-python).
|
|
52
|
+
3. Create a GitHub release with a new tag `vX.Y.Z` on `main`, matching the
|
|
53
|
+
version, and the changelog section as its notes. Publishing it starts the
|
|
54
|
+
Release workflow, which builds the package, checks that the tag matches the
|
|
55
|
+
version and points to a commit on `main`, and uploads to PyPI.
|
|
56
|
+
|
|
57
|
+
### Release configuration
|
|
58
|
+
|
|
59
|
+
Publishing depends on settings outside this repository. If releases fail with
|
|
60
|
+
a publisher or environment error, or after moving or renaming the repository,
|
|
61
|
+
the workflow, or an environment, check that these still match:
|
|
62
|
+
|
|
63
|
+
- **PyPI and TestPyPI:** the `harmonize-python` project has a trusted publisher
|
|
64
|
+
for owner `harmonize-software`, repository `harmonize`, workflow
|
|
65
|
+
`release.yml`, and environment `pypi` (on pypi.org) or `testpypi` (on
|
|
66
|
+
test.pypi.org). No token is stored anywhere.
|
|
67
|
+
- **Environments** (Settings -> Environments): `pypi` allows the tag pattern
|
|
68
|
+
`v*`, since a release runs on its tag rather than a branch, and may require a
|
|
69
|
+
reviewer's approval; `testpypi` allows only `main`.
|
|
70
|
+
- **Tag ruleset** (Settings -> Rules): only maintainers may create, move, or
|
|
71
|
+
delete tags matching `v*`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, CEMeNT
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|