Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
45f524b
working feature trasnform
kevinjohncutler Aug 17, 2025
9d710a1
faster expand labels
kevinjohncutler Aug 18, 2025
42cd8ef
faster
kevinjohncutler Aug 19, 2025
dbadc5c
True ND
kevinjohncutler Aug 24, 2025
c2903a9
tuning
kevinjohncutler Aug 29, 2025
597fe3b
parity
kevinjohncutler Aug 30, 2025
ecfa3c1
parallel tuning
kevinjohncutler Aug 30, 2025
629d0ff
better performance
kevinjohncutler Sep 28, 2025
24caea4
tests
kevinjohncutler Sep 28, 2025
6d0dbd4
run tests
kevinjohncutler Sep 28, 2025
8320f53
update test yaml
kevinjohncutler Sep 28, 2025
21d73de
test yaml
kevinjohncutler Sep 28, 2025
ce1eff2
fix build on M3
kevinjohncutler Sep 28, 2025
babe06c
fix windows build
kevinjohncutler Sep 28, 2025
df4bb26
fix profile
kevinjohncutler Sep 28, 2025
5a7c575
faster across the board depending on threads
kevinjohncutler Sep 30, 2025
6e8f5ea
testing refactor
kevinjohncutler Sep 30, 2025
6ff3bd6
faster across the board
kevinjohncutler Oct 18, 2025
413590d
cleanup
kevinjohncutler Oct 19, 2025
533b54c
cleanup
kevinjohncutler Oct 20, 2025
e1a0bc6
cleanup
kevinjohncutler Oct 21, 2025
e15fe81
CI
kevinjohncutler Oct 21, 2025
d88b94d
fix tests
kevinjohncutler Oct 21, 2025
66c32f4
refactor
kevinjohncutler Oct 22, 2025
f8f7358
refacotr and tests
kevinjohncutler Oct 24, 2025
f45fe9c
tests
kevinjohncutler Oct 25, 2025
061a269
tests
kevinjohncutler Oct 25, 2025
07b814f
CI
kevinjohncutler Oct 25, 2025
80001b3
CI
kevinjohncutler Oct 25, 2025
a4e8336
CI
kevinjohncutler Oct 25, 2025
15275ee
Sync legacy with upstream and add feature transform tests
kevinjohncutler Jan 22, 2026
b01f628
Remove upstream snapshot
kevinjohncutler Jan 22, 2026
f952e19
Refactor dtype dispatch in edtsq_nd
kevinjohncutler Jan 22, 2026
024600e
Checkpoint before fused dispatch refactor
kevinjohncutler Jan 22, 2026
6074302
Fuse ND dispatch and align legacy build flags
kevinjohncutler Jan 22, 2026
f59382a
Fuse ND dispatch, align legacy flags, update wheel workflow
kevinjohncutler Jan 23, 2026
0ade9d6
Fix wheel build version scheme
kevinjohncutler Jan 23, 2026
a2c349b
Rename ND APIs and clean threadpool join
kevinjohncutler Jan 23, 2026
2ea2f14
Add legacy docstrings to ND functions
kevinjohncutler Jan 23, 2026
1aa0b30
Fix wheel version scheme in CI
kevinjohncutler Jan 23, 2026
e81ddc3
Fix wheel version scheme
kevinjohncutler Jan 23, 2026
7cb2008
Add voxel graph tests and debug utils
kevinjohncutler Jan 23, 2026
2b4c4ec
Limit wheel arch targets
kevinjohncutler Jan 23, 2026
e143276
Refine ND batch pass and CI benchmarks
kevinjohncutler Jan 24, 2026
3c0a2fa
Fix benchmark summary import
kevinjohncutler Jan 25, 2026
7d2d495
Enable ND profile in benchmark workflow
kevinjohncutler Jan 25, 2026
d387e67
Sanitize benchmark summary titles
kevinjohncutler Jan 25, 2026
e05e718
Use median timing with 20 reps in benchmarks
kevinjohncutler Jan 25, 2026
e67af41
Strip literal newline escapes from benchmark summary
kevinjohncutler Jan 25, 2026
b4c01c4
Fix benchmark summary newlines
kevinjohncutler Jan 25, 2026
3f28d82
updated test templates
kevinjohncutler Jan 25, 2026
d3020b7
barrier algorithm
kevinjohncutler Jan 31, 2026
40e2976
memset confirm
kevinjohncutler Jan 31, 2026
0f44c72
minor optim
kevinjohncutler Feb 1, 2026
f495073
filter_active_scanlines
kevinjohncutler Feb 2, 2026
c0b9f21
benchmarking
kevinjohncutler Feb 3, 2026
523099c
numa
kevinjohncutler Feb 3, 2026
434bd9b
closer to parity on AMD
kevinjohncutler Feb 3, 2026
70ffb40
nd_v2 graph based
kevinjohncutler Feb 5, 2026
8bb5c8c
cleanup, typos, readme
kevinjohncutler Feb 6, 2026
b405d0e
remove experimental extensions from CI build
kevinjohncutler Feb 6, 2026
06caffb
remove edt_barrier dependency from tests
kevinjohncutler Feb 6, 2026
c6c8be8
use edt_legacy for sdf test comparison
kevinjohncutler Feb 6, 2026
45bb7bf
dtypes, readme memory
kevinjohncutler Feb 6, 2026
9c947d0
fix legacy module detection in benchmark scripts
kevinjohncutler Feb 6, 2026
9d852d3
readme
kevinjohncutler Feb 6, 2026
4c0cb01
readme
kevinjohncutler Feb 6, 2026
d2476b7
generalize voxel graph memory
kevinjohncutler Feb 6, 2026
8fd4e69
scripts
kevinjohncutler Feb 6, 2026
2a25aea
scripts
kevinjohncutler Feb 6, 2026
bf3a985
populate _nd_profile_last with parallel_used in edtsq/edtsq_graph
kevinjohncutler Feb 10, 2026
46544ff
factor dimension handling
kevinjohncutler Feb 18, 2026
f3d391a
double
kevinjohncutler Feb 18, 2026
978b456
sqrt allocation
kevinjohncutler Feb 18, 2026
2d2d412
hedley
kevinjohncutler Feb 18, 2026
38a6a25
env variables
kevinjohncutler Feb 18, 2026
56497d4
scope contamination, special cases
kevinjohncutler Feb 18, 2026
e2c5274
fortran order support
kevinjohncutler Feb 18, 2026
ced2072
prefetch env vars
kevinjohncutler Feb 19, 2026
50b67b5
remove prefetch
kevinjohncutler Feb 19, 2026
9dadc11
view
kevinjohncutler Feb 19, 2026
b0b8af0
remove float casts
kevinjohncutler Feb 20, 2026
6a8cf45
remove unneeded casts
kevinjohncutler Feb 20, 2026
d1b9328
docstrings, generalize build_graph
kevinjohncutler Feb 20, 2026
7c74154
MSVC
kevinjohncutler Feb 21, 2026
09fa3e2
MSVC
kevinjohncutler Feb 22, 2026
aec6c8f
address PR review comments
kevinjohncutler Feb 25, 2026
33a7697
optimize build
kevinjohncutler Feb 25, 2026
e9706de
native arm
kevinjohncutler Feb 25, 2026
130b21d
build tweaks
kevinjohncutler Feb 25, 2026
0347c4e
foreground bit 0
kevinjohncutler Feb 27, 2026
bdf51f7
view, cdef
kevinjohncutler Feb 27, 2026
b502f97
build wheels
kevinjohncutler Feb 27, 2026
6c17443
bools, remove features_dtype
kevinjohncutler Feb 27, 2026
453e908
C++ implementation of expand_labels
kevinjohncutler Feb 27, 2026
a75364c
thread caps
kevinjohncutler Feb 27, 2026
7aed682
cleanup
kevinjohncutler Feb 28, 2026
c5be4fd
cleanup
kevinjohncutler Feb 28, 2026
3961a9c
cleanup
kevinjohncutler Feb 28, 2026
541ac79
32D
kevinjohncutler Feb 28, 2026
d41c3d5
threadpool and cleanup
kevinjohncutler Feb 28, 2026
4768bbf
cleanup
kevinjohncutler Mar 1, 2026
99bee54
cleanup
kevinjohncutler Mar 1, 2026
c804253
cleanup
kevinjohncutler Mar 1, 2026
aae10e1
cleanup, refactor
kevinjohncutler Mar 1, 2026
b2122ca
cleanup, refactor
kevinjohncutler Mar 1, 2026
94a36f8
cleanup, helpers
kevinjohncutler Mar 2, 2026
52d5a34
cleanup, style
kevinjohncutler Mar 2, 2026
88ffabf
namefix
kevinjohncutler Mar 2, 2026
6caff12
clean
kevinjohncutler Mar 3, 2026
b9a7bb2
intel mac build
kevinjohncutler Mar 3, 2026
80cd6ca
CI bench
kevinjohncutler Mar 3, 2026
6a485e0
ForkJoinPool, buf cache, blocked transpose
kevinjohncutler Mar 6, 2026
e4428cd
setup.py
kevinjohncutler Mar 6, 2026
75cc5ad
MSVC
kevinjohncutler Mar 6, 2026
a69bbcd
new thread caps
kevinjohncutler Mar 6, 2026
99703a3
build
kevinjohncutler Mar 6, 2026
21a691a
comments
kevinjohncutler Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .dockerignore
100644 → 100755
Empty file.
108 changes: 108 additions & 0 deletions .github/workflows/bench_nd_profile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: ND Benchmark Profile

on:
workflow_dispatch:

jobs:
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install numpy

- name: Install package (editable)
run: python -m pip install -e .

- name: Run legacy vs ND benchmark
run: |
set -euo pipefail
# Dense (structured) templates
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 128x128,512x512,1024x1024,2048x2048 --template structured --grid-base 8x8 \
--output benchmarks/legacy_vs_nd_explicit_ci.template_structured_2d.csv
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 96x96x96,192x192x192 --template structured --grid-base 8x8x8 \
--output benchmarks/legacy_vs_nd_explicit_ci.template_structured_3d.csv

# Sparse (mod8) templates
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 128x128,512x512,1024x1024,2048x2048 --template structured_mod8 --grid-base 8x8 \
--output benchmarks/legacy_vs_nd_explicit_ci.template_structured_mod8_2d.csv
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 96x96x96,192x192x192 --template structured_mod8 --grid-base 8x8x8 \
--output benchmarks/legacy_vs_nd_explicit_ci.template_structured_mod8_3d.csv

# Circle templates (2D only)
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 128x128,512x512,1024x1024,2048x2048 --template circles_small \
--output benchmarks/legacy_vs_nd_explicit_ci.template_circles_small_2d.csv
python scripts/bench_explicit_threads.py \
--parallels 1,2,4,8 --reps 20 --dtype uint16 --profile \
--shapes 128x128,512x512,1024x1024,2048x2048 --template circles_large \
--output benchmarks/legacy_vs_nd_explicit_ci.template_circles_large_2d.csv

- name: Summarize results
run: |
python - <<'PY'
import csv
import os
from pathlib import Path

header = [
"shape",
"dims",
"parallel",
"legacy_ms",
"nd_ms",
"ratio",
"nd_parallel_used",
"max_abs_diff",
]

def render_table(title, csv_path):
title = title.replace("\n", " ").strip()
if not csv_path.exists():
return f"### {title}\n\nMissing CSV: `{csv_path}`\n"
with csv_path.open() as fp:
reader = csv.DictReader(fp)
rows = list(reader)
if not rows:
return f"### {title}\n\nNo benchmark rows captured.\n"
table = [f"### {title}\n", "| " + " | ".join(header) + " |"]
table.append("| " + " | ".join(["---"] * len(header)) + " |")
for row in rows:
table.append("| " + " | ".join(row[h] for h in header) + " |")
return "\n".join(table) + "\n"

sections = []
sections.append(render_table("Structured (dense) 2D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_structured_2d.csv")))
sections.append(render_table("Structured (dense) 3D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_structured_3d.csv")))
sections.append(render_table("Structured mod8 (sparse) 2D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_structured_mod8_2d.csv")))
sections.append(render_table("Structured mod8 (sparse) 3D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_structured_mod8_3d.csv")))
sections.append(render_table("Circles small 2D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_circles_small_2d.csv")))
sections.append(render_table("Circles large 2D", Path("benchmarks/legacy_vs_nd_explicit_ci.template_circles_large_2d.csv")))

summary_path = Path(os.environ["GITHUB_STEP_SUMMARY"])
summary_path.write_text("## ND Benchmark Profile\n\n" + "\n".join(sections))
PY

- name: Upload benchmark CSV
uses: actions/upload-artifact@v4
with:
name: legacy-vs-nd-explicit-results
path: benchmarks/legacy_vs_nd_explicit_ci.template_*.csv
if-no-files-found: error
43 changes: 26 additions & 17 deletions .github/workflows/build_wheels.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,45 +1,54 @@
name: Build Wheels

on:
workflow_dispatch:
workflow_dispatch: {}
push:
tags:
- '*'
env:
CIBW_SKIP: pp38* pp39* pp310* *-musllinux*
# Supported stable CPython versions (adjust as versions EOL).
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux*"

jobs:
build_wheels:
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }}
name: Build ${{ matrix.archs_linux }}${{ matrix.archs_windows }}${{ matrix.archs_macos }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
arch: [auto]
include:
- os: ubuntu-latest
arch: aarch64
archs_linux: "x86_64"
- os: ubuntu-24.04-arm
archs_linux: "aarch64"
- os: windows-latest
archs_windows: "AMD64"
- os: windows-11-arm
archs_windows: "ARM64"
cibw_build: "cp311-* cp312-* cp313-* cp314-*" # cp310 lacks win_arm64 support
- os: macos-15-intel
archs_macos: "x86_64"
- os: macos-latest
archs_macos: "arm64"

steps:
- uses: actions/checkout@v2

- name: Set up QEMU
if: ${{ matrix.arch == 'aarch64' }}
uses: docker/setup-qemu-action@v1
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
uses: pypa/cibuildwheel@v3.3.1
with:
output-dir: ./wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_ARCHS_LINUX: ${{matrix.arch}}
CIBW_BEFORE_BUILD: pip install numpy setuptools wheel
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_BUILD: ${{ matrix.cibw_build || env.CIBW_BUILD }}
CIBW_ARCHS_LINUX: ${{ matrix.archs_linux }}
CIBW_ARCHS_WINDOWS: ${{ matrix.archs_windows }}
CIBW_ARCHS_MACOS: ${{ matrix.archs_macos }}
# Avoid date-stamped local versions that can cause wheel filename mismatch.
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_LOCAL_SCHEME=no-local-version EDT_MARCH_NATIVE=0"

- name: Upload built wheels
uses: actions/upload-artifact@v4
with:
name: built-wheels-${{ matrix.os }}-${{ matrix.arch }}
name: built-wheels-${{ matrix.os }}-${{ matrix.archs_linux }}${{ matrix.archs_windows }}${{ matrix.archs_macos }}
path: ./wheelhouse/*.whl
if-no-files-found: warn
19 changes: 10 additions & 9 deletions .github/workflows/tests.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Tests

on:
workflow_dispatch:
push:
branches:
- master
Expand All @@ -14,24 +15,24 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/checkout@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest numpy scipy setuptools wheel
python -m pip install cython pytest numpy scipy setuptools wheel

- name: Compile
run: python setup.py develop
- name: Install package (editable)
run: python -m pip install -e .

- name: Test with pytest
run: python -m pytest -v -x automated_test.py
run: python -m pytest -v -x tests
3 changes: 3 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@
.pytest_cache
cpp/test

# Cython-generated C++ (rebuilt on every install)
src/edt.cpp
legacy/edt.cpp

test.py
test2.py
test3.py
test4.py
benchmarks/*.csv
Empty file modified .travis.yml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions AUTHORS
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Kevin Cutler <39454982+kevinjohncutler@users.noreply.github.com>
Pavlo Hilei <45758974+Pavlik1400@users.noreply.github.com>
William Silversmith <william.silversmith@gmail.com>
William Silversmith <ws9@princeton.edu>
Empty file modified COPYING
100644 → 100755
Empty file.
Empty file modified COPYING.LESSER
100644 → 100755
Empty file.
Loading