raptor-hawk 0.3.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.
- raptor_hawk-0.3.0/.github/workflows/ci.yml +121 -0
- raptor_hawk-0.3.0/.github/workflows/docs.yml +122 -0
- raptor_hawk-0.3.0/.github/workflows/publish.yml +304 -0
- raptor_hawk-0.3.0/.gitignore +17 -0
- raptor_hawk-0.3.0/CHANGELOG.md +253 -0
- raptor_hawk-0.3.0/CITATION.cff +20 -0
- raptor_hawk-0.3.0/CMakeLists.txt +167 -0
- raptor_hawk-0.3.0/CONTRIBUTING.md +39 -0
- raptor_hawk-0.3.0/LICENSE +202 -0
- raptor_hawk-0.3.0/NOTICE +2 -0
- raptor_hawk-0.3.0/PKG-INFO +288 -0
- raptor_hawk-0.3.0/README.md +256 -0
- raptor_hawk-0.3.0/docs/Makefile +60 -0
- raptor_hawk-0.3.0/docs/_static/.gitkeep +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/app_icon_180.png +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/family_hawk.svg +1 -0
- raptor_hawk-0.3.0/docs/_static/brand/favicon.ico +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/favicon.svg +1 -0
- raptor_hawk-0.3.0/docs/_static/brand/favicon_32.png +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/favicon_48.png +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/glyph_hawk.svg +1 -0
- raptor_hawk-0.3.0/docs/_static/brand/social_preview.png +0 -0
- raptor_hawk-0.3.0/docs/_static/brand/wide_family_hawk.svg +1 -0
- raptor_hawk-0.3.0/docs/_static/ecosystem/ecosystem_hawk_dark.svg +15 -0
- raptor_hawk-0.3.0/docs/_static/ecosystem/ecosystem_hawk_light.svg +15 -0
- raptor_hawk-0.3.0/docs/_static/fonts/LICENSE-recursive.txt +93 -0
- raptor_hawk-0.3.0/docs/_static/fonts/recursive-full.woff2 +0 -0
- raptor_hawk-0.3.0/docs/_static/raptor-reveal.css +17 -0
- raptor_hawk-0.3.0/docs/_static/raptor-theme.css +179 -0
- raptor_hawk-0.3.0/docs/_static/raptor-tokens.css +73 -0
- raptor_hawk-0.3.0/docs/_static/site-accent.css +5 -0
- raptor_hawk-0.3.0/docs/_templates/autosummary/base.rst +9 -0
- raptor_hawk-0.3.0/docs/_templates/autosummary/class.rst +40 -0
- raptor_hawk-0.3.0/docs/_templates/autosummary/function.rst +5 -0
- raptor_hawk-0.3.0/docs/_templates/autosummary/module.rst +57 -0
- raptor_hawk-0.3.0/docs/conf.py +188 -0
- raptor_hawk-0.3.0/docs/content/_shared/nb_helpers.py +77 -0
- raptor_hawk-0.3.0/docs/content/api/index.md +28 -0
- raptor_hawk-0.3.0/docs/content/compile_cache.ipynb +185 -0
- raptor_hawk-0.3.0/docs/content/compile_options.ipynb +222 -0
- raptor_hawk-0.3.0/docs/content/contributing/add_a_native_function.md +66 -0
- raptor_hawk-0.3.0/docs/content/contributing.md +56 -0
- raptor_hawk-0.3.0/docs/content/examples/01_ensemble_drag_throughput.ipynb +198 -0
- raptor_hawk-0.3.0/docs/content/examples/02_autodiff_finite_difference_check.ipynb +238 -0
- raptor_hawk-0.3.0/docs/content/examples/03_kernelkind_reuse.ipynb +230 -0
- raptor_hawk-0.3.0/docs/content/examples/04_hawk_next_to_warp.ipynb +436 -0
- raptor_hawk-0.3.0/docs/content/examples.md +13 -0
- raptor_hawk-0.3.0/docs/content/installation.md +260 -0
- raptor_hawk-0.3.0/docs/content/interop.md +121 -0
- raptor_hawk-0.3.0/docs/content/tutorials/01_your_first_kernel.ipynb +306 -0
- raptor_hawk-0.3.0/docs/content/tutorials/02_arguments_and_shapes.ipynb +654 -0
- raptor_hawk-0.3.0/docs/content/tutorials/03_stop_when_youre_done.ipynb +393 -0
- raptor_hawk-0.3.0/docs/content/tutorials/04_gradients_backward.ipynb +383 -0
- raptor_hawk-0.3.0/docs/content/tutorials/05_gradients_forward.ipynb +390 -0
- raptor_hawk-0.3.0/docs/content/tutorials/06_lookups_scatters_and_sums.ipynb +546 -0
- raptor_hawk-0.3.0/docs/content/tutorials.md +19 -0
- raptor_hawk-0.3.0/docs/content/vocabulary/01_a_family_of_kernels.ipynb +401 -0
- raptor_hawk-0.3.0/docs/content/vocabulary/02_extend_by_inheritance.ipynb +351 -0
- raptor_hawk-0.3.0/docs/content/vocabulary/03_your_own_derivative.ipynb +546 -0
- raptor_hawk-0.3.0/docs/content/vocabulary/04_capstone.ipynb +963 -0
- raptor_hawk-0.3.0/docs/content/vocabulary/when_hawk_cant_spell_it.md +78 -0
- raptor_hawk-0.3.0/docs/content/vocabulary.md +19 -0
- raptor_hawk-0.3.0/docs/index.md +165 -0
- raptor_hawk-0.3.0/docs/requirements.txt +12 -0
- raptor_hawk-0.3.0/docs/tools/nb_check_filled.py +111 -0
- raptor_hawk-0.3.0/docs/tools/nb_execute.py +69 -0
- raptor_hawk-0.3.0/hawk/__init__.py +220 -0
- raptor_hawk-0.3.0/hawk/_bind_checks.py +328 -0
- raptor_hawk-0.3.0/hawk/_contracts.py +90 -0
- raptor_hawk-0.3.0/hawk/_plane_layout.py +86 -0
- raptor_hawk-0.3.0/hawk/_roots.py +97 -0
- raptor_hawk-0.3.0/hawk/artifact/__init__.py +136 -0
- raptor_hawk-0.3.0/hawk/artifact/bundle.py +810 -0
- raptor_hawk-0.3.0/hawk/artifact/derivative.py +120 -0
- raptor_hawk-0.3.0/hawk/artifact/layout.py +60 -0
- raptor_hawk-0.3.0/hawk/artifact/manifest.py +81 -0
- raptor_hawk-0.3.0/hawk/artifact/sidecar.py +317 -0
- raptor_hawk-0.3.0/hawk/artifact/unit_cache.py +205 -0
- raptor_hawk-0.3.0/hawk/compile/__init__.py +72 -0
- raptor_hawk-0.3.0/hawk/compile/cache.py +439 -0
- raptor_hawk-0.3.0/hawk/compile/drivers.py +512 -0
- raptor_hawk-0.3.0/hawk/compile/nvrtc.py +533 -0
- raptor_hawk-0.3.0/hawk/compile/payload.py +61 -0
- raptor_hawk-0.3.0/hawk/compile/toolchain.py +873 -0
- raptor_hawk-0.3.0/hawk/diff/__init__.py +13 -0
- raptor_hawk-0.3.0/hawk/diff/loops.py +455 -0
- raptor_hawk-0.3.0/hawk/diff/rules.py +585 -0
- raptor_hawk-0.3.0/hawk/diff/transform.py +606 -0
- raptor_hawk-0.3.0/hawk/emit/__init__.py +40 -0
- raptor_hawk-0.3.0/hawk/emit/aether.py +1163 -0
- raptor_hawk-0.3.0/hawk/emit/backend.py +742 -0
- raptor_hawk-0.3.0/hawk/emit/cuda.py +496 -0
- raptor_hawk-0.3.0/hawk/emit/dispatch.py +279 -0
- raptor_hawk-0.3.0/hawk/emit/fused.py +223 -0
- raptor_hawk-0.3.0/hawk/emit/host.py +1113 -0
- raptor_hawk-0.3.0/hawk/emit/spelling.py +320 -0
- raptor_hawk-0.3.0/hawk/ext/__init__.py +516 -0
- raptor_hawk-0.3.0/hawk/ext/primitive.py +154 -0
- raptor_hawk-0.3.0/hawk/ir/__init__.py +63 -0
- raptor_hawk-0.3.0/hawk/ir/access.py +315 -0
- raptor_hawk-0.3.0/hawk/ir/compound.py +133 -0
- raptor_hawk-0.3.0/hawk/ir/contraction.py +429 -0
- raptor_hawk-0.3.0/hawk/ir/loop_nodes.py +461 -0
- raptor_hawk-0.3.0/hawk/ir/loops.py +272 -0
- raptor_hawk-0.3.0/hawk/ir/nodes.py +514 -0
- raptor_hawk-0.3.0/hawk/ir/ops.py +307 -0
- raptor_hawk-0.3.0/hawk/ir/segment.py +162 -0
- raptor_hawk-0.3.0/hawk/ir/walk.py +467 -0
- raptor_hawk-0.3.0/hawk/math.py +366 -0
- raptor_hawk-0.3.0/hawk/py.typed +0 -0
- raptor_hawk-0.3.0/hawk/runtime.py +395 -0
- raptor_hawk-0.3.0/hawk/trace/__init__.py +74 -0
- raptor_hawk-0.3.0/hawk/trace/astpass.py +977 -0
- raptor_hawk-0.3.0/hawk/trace/decl.py +245 -0
- raptor_hawk-0.3.0/hawk/trace/kernel.py +551 -0
- raptor_hawk-0.3.0/hawk/trace/raw.py +70 -0
- raptor_hawk-0.3.0/hawk/trace/steps.py +231 -0
- raptor_hawk-0.3.0/hawk/trace/value.py +733 -0
- raptor_hawk-0.3.0/hawk/types.py +88 -0
- raptor_hawk-0.3.0/pyproject.toml +147 -0
- raptor_hawk-0.3.0/src/_build_digest.py.in +15 -0
- raptor_hawk-0.3.0/src/hawk_build_digest.h.in +23 -0
- raptor_hawk-0.3.0/src/hawk_core.cpp +648 -0
- raptor_hawk-0.3.0/tests/_cards.py +45 -0
- raptor_hawk-0.3.0/tests/_dags.py +65 -0
- raptor_hawk-0.3.0/tests/_deploy.py +249 -0
- raptor_hawk-0.3.0/tests/_deployable.py +301 -0
- raptor_hawk-0.3.0/tests/_device_file.py +21 -0
- raptor_hawk-0.3.0/tests/_emitted.py +42 -0
- raptor_hawk-0.3.0/tests/_eval.py +312 -0
- raptor_hawk-0.3.0/tests/_interchange.py +41 -0
- raptor_hawk-0.3.0/tests/_kan.py +297 -0
- raptor_hawk-0.3.0/tests/_kernels.py +106 -0
- raptor_hawk-0.3.0/tests/_oracle.py +129 -0
- raptor_hawk-0.3.0/tests/_planted.py +77 -0
- raptor_hawk-0.3.0/tests/_toolchain.py +144 -0
- raptor_hawk-0.3.0/tests/cards/CARD_COMPILE_TIME.md +106 -0
- raptor_hawk-0.3.0/tests/cards/CARD_DIFF_RULES.md +117 -0
- raptor_hawk-0.3.0/tests/cards/CARD_LAUNCH_CROSSINGS.md +94 -0
- raptor_hawk-0.3.0/tests/cards/CARD_LOOP_LOWERING.md +172 -0
- raptor_hawk-0.3.0/tests/conftest.py +88 -0
- raptor_hawk-0.3.0/tests/mpi/_bed_artifact.py +182 -0
- raptor_hawk-0.3.0/tests/mpi/check_hawk_rank_bed.sh +407 -0
- raptor_hawk-0.3.0/tests/mpi/expected_tests_hawk_rank_bed.txt +10 -0
- raptor_hawk-0.3.0/tests/mpi/test_hawk_rank_oracle.py +343 -0
- raptor_hawk-0.3.0/tests/test_access_inference.py +91 -0
- raptor_hawk-0.3.0/tests/test_active_fast_entries.py +294 -0
- raptor_hawk-0.3.0/tests/test_artifact_deploy.py +183 -0
- raptor_hawk-0.3.0/tests/test_artifact_derivative_cross_unit.py +138 -0
- raptor_hawk-0.3.0/tests/test_artifact_derivative_per_kernel.py +175 -0
- raptor_hawk-0.3.0/tests/test_artifact_manifest.py +73 -0
- raptor_hawk-0.3.0/tests/test_artifact_plugins.py +124 -0
- raptor_hawk-0.3.0/tests/test_artifact_publish.py +682 -0
- raptor_hawk-0.3.0/tests/test_artifact_quantity.py +88 -0
- raptor_hawk-0.3.0/tests/test_artifact_sidecar_shapes.py +316 -0
- raptor_hawk-0.3.0/tests/test_authoring_import_cost.py +75 -0
- raptor_hawk-0.3.0/tests/test_build_arch_default.py +243 -0
- raptor_hawk-0.3.0/tests/test_build_counter.py +93 -0
- raptor_hawk-0.3.0/tests/test_compile_address_cap.py +146 -0
- raptor_hawk-0.3.0/tests/test_compile_cache.py +762 -0
- raptor_hawk-0.3.0/tests/test_compile_device_target.py +182 -0
- raptor_hawk-0.3.0/tests/test_compile_nvrtc.py +333 -0
- raptor_hawk-0.3.0/tests/test_compile_portability.py +365 -0
- raptor_hawk-0.3.0/tests/test_compile_time_card.py +147 -0
- raptor_hawk-0.3.0/tests/test_core_purity.py +418 -0
- raptor_hawk-0.3.0/tests/test_core_selfcheck.py +367 -0
- raptor_hawk-0.3.0/tests/test_diff_cross_sample.py +103 -0
- raptor_hawk-0.3.0/tests/test_diff_derived_walk.py +92 -0
- raptor_hawk-0.3.0/tests/test_diff_dispatch_table_vjp.py +106 -0
- raptor_hawk-0.3.0/tests/test_diff_finite_differences.py +331 -0
- raptor_hawk-0.3.0/tests/test_diff_rule_card.py +228 -0
- raptor_hawk-0.3.0/tests/test_diff_second_order_loops.py +373 -0
- raptor_hawk-0.3.0/tests/test_diff_terminated.py +329 -0
- raptor_hawk-0.3.0/tests/test_dispatch.py +1037 -0
- raptor_hawk-0.3.0/tests/test_dispatch_scoped_hoist.py +214 -0
- raptor_hawk-0.3.0/tests/test_emit_active_set.py +192 -0
- raptor_hawk-0.3.0/tests/test_emit_body_identity.py +123 -0
- raptor_hawk-0.3.0/tests/test_emit_compiles.py +81 -0
- raptor_hawk-0.3.0/tests/test_emit_fused_compose.py +305 -0
- raptor_hawk-0.3.0/tests/test_emit_fused_lanes.py +72 -0
- raptor_hawk-0.3.0/tests/test_emit_no_geometry.py +75 -0
- raptor_hawk-0.3.0/tests/test_emit_no_scalarised_chain.py +166 -0
- raptor_hawk-0.3.0/tests/test_emit_role_mirror_map.py +161 -0
- raptor_hawk-0.3.0/tests/test_emit_sample_subscript.py +467 -0
- raptor_hawk-0.3.0/tests/test_emit_scalar_modes.py +95 -0
- raptor_hawk-0.3.0/tests/test_emit_terminated_early_exit.py +269 -0
- raptor_hawk-0.3.0/tests/test_ext_kind_inheritance.py +343 -0
- raptor_hawk-0.3.0/tests/test_ext_kind_vocabulary.py +298 -0
- raptor_hawk-0.3.0/tests/test_ext_primitive.py +308 -0
- raptor_hawk-0.3.0/tests/test_ext_returned_sinks.py +219 -0
- raptor_hawk-0.3.0/tests/test_ext_seams.py +782 -0
- raptor_hawk-0.3.0/tests/test_finish_own_sample.py +359 -0
- raptor_hawk-0.3.0/tests/test_host_compile_cost.py +171 -0
- raptor_hawk-0.3.0/tests/test_host_interchange.py +564 -0
- raptor_hawk-0.3.0/tests/test_host_simd.py +542 -0
- raptor_hawk-0.3.0/tests/test_host_two_wire.py +185 -0
- raptor_hawk-0.3.0/tests/test_index_width.py +156 -0
- raptor_hawk-0.3.0/tests/test_ir_contraction.py +395 -0
- raptor_hawk-0.3.0/tests/test_ir_index_form.py +168 -0
- raptor_hawk-0.3.0/tests/test_ir_loop_digest_memory.py +343 -0
- raptor_hawk-0.3.0/tests/test_keyword_only_params.py +55 -0
- raptor_hawk-0.3.0/tests/test_launch_crossings.py +358 -0
- raptor_hawk-0.3.0/tests/test_layout_selfcheck.py +90 -0
- raptor_hawk-0.3.0/tests/test_loop_early_exit.py +577 -0
- raptor_hawk-0.3.0/tests/test_loop_lowering_card.py +481 -0
- raptor_hawk-0.3.0/tests/test_math_namespace.py +375 -0
- raptor_hawk-0.3.0/tests/test_math_parity.py +913 -0
- raptor_hawk-0.3.0/tests/test_mutable_plain_variable.py +198 -0
- raptor_hawk-0.3.0/tests/test_partition_soundness.py +293 -0
- raptor_hawk-0.3.0/tests/test_persist.py +415 -0
- raptor_hawk-0.3.0/tests/test_public_api.py +184 -0
- raptor_hawk-0.3.0/tests/test_quantity_span.py +104 -0
- raptor_hawk-0.3.0/tests/test_random_op.py +659 -0
- raptor_hawk-0.3.0/tests/test_refusal_pins.py +150 -0
- raptor_hawk-0.3.0/tests/test_runtime_n_inference.py +206 -0
- raptor_hawk-0.3.0/tests/test_runtime_reserved_words.py +53 -0
- raptor_hawk-0.3.0/tests/test_runtime_sample_major.py +181 -0
- raptor_hawk-0.3.0/tests/test_runtime_validation.py +232 -0
- raptor_hawk-0.3.0/tests/test_sealed_payload_host_vector_math.py +112 -0
- raptor_hawk-0.3.0/tests/test_serial_oracle.py +249 -0
- raptor_hawk-0.3.0/tests/test_severance.py +51 -0
- raptor_hawk-0.3.0/tests/test_sidecar_mutables.py +143 -0
- raptor_hawk-0.3.0/tests/test_single_derivation.py +96 -0
- raptor_hawk-0.3.0/tests/test_sink_exclusivity.py +63 -0
- raptor_hawk-0.3.0/tests/test_steps.py +794 -0
- raptor_hawk-0.3.0/tests/test_trace_ast_memo.py +95 -0
- raptor_hawk-0.3.0/tests/test_trace_constant_division.py +50 -0
- raptor_hawk-0.3.0/tests/test_trace_control_flow.py +201 -0
- raptor_hawk-0.3.0/tests/test_trace_loop_lowering.py +510 -0
- raptor_hawk-0.3.0/tests/test_trace_loop_vector_index.py +420 -0
- raptor_hawk-0.3.0/tests/test_trace_op_exports.py +359 -0
- raptor_hawk-0.3.0/tests/test_trace_prior.py +233 -0
- raptor_hawk-0.3.0/tests/test_trace_quantity_span.py +107 -0
- raptor_hawk-0.3.0/tests/test_trace_raw_device.py +85 -0
- raptor_hawk-0.3.0/tests/test_trace_value.py +93 -0
- raptor_hawk-0.3.0/tests/test_types_import_cost.py +64 -0
- raptor_hawk-0.3.0/tests/test_walk_determinism.py +53 -0
- raptor_hawk-0.3.0/tests/test_walk_leaf_merge.py +69 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Copyright 2026 Alessandro Masat
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
#
|
|
4
|
+
# ── CUDA toolchain caveat — READ BEFORE trusting a green run ────────────────
|
|
5
|
+
# tests/conftest.py's `built` session fixture (used by ~half the test files)
|
|
6
|
+
# builds every fixture kernel for BOTH the "host" and "cuda" targets
|
|
7
|
+
# (`BOTH = ("cuda", "host")`); tests/_toolchain.py is explicit that a missing
|
|
8
|
+
# nvcc FAILS rather than skips ("a skipped compile row certifies nothing"),
|
|
9
|
+
# and there is no gpu/cuda pytest marker to deselect with. Rather than accept
|
|
10
|
+
# that as permanently red, this job provisions a COMPILE-ONLY CUDA toolchain
|
|
11
|
+
# (nvcc AOT `-c`, never executed — no GPU or driver involved) via NVIDIA's
|
|
12
|
+
# apt repo for Ubuntu 24.04. This was authored and YAML-validated offline;
|
|
13
|
+
# it was NOT run anywhere, so the exact package set/versions below are
|
|
14
|
+
# unverified against a live runner.
|
|
15
|
+
|
|
16
|
+
name: CI
|
|
17
|
+
|
|
18
|
+
on: [push, pull_request]
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
test:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
env:
|
|
28
|
+
CC: gcc-13
|
|
29
|
+
CXX: g++-13
|
|
30
|
+
HAWK_CXX: g++-13
|
|
31
|
+
# tests/_toolchain.py's device_compiler(): $HAWK_NVCC first, else the
|
|
32
|
+
# hardcoded /usr/local/cuda-12.6/bin/nvcc, else bare `nvcc` on PATH.
|
|
33
|
+
# Set explicitly so it does not depend on PATH ordering.
|
|
34
|
+
HAWK_NVCC: /usr/local/cuda-12.6/bin/nvcc
|
|
35
|
+
# nvcc's host compiler for the device TU (env "NVCC_PREPEND_FLAGS
|
|
36
|
+
# -ccbin ..."); CUDA 12.6 rejects gcc > 13, so pin it to the g++-13
|
|
37
|
+
# installed below rather than /usr/bin/g++'s default alias.
|
|
38
|
+
HAWK_NVCC_CCBIN: /usr/bin/g++-13
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v7
|
|
41
|
+
with:
|
|
42
|
+
path: hawk
|
|
43
|
+
|
|
44
|
+
# aether/eagle as sibling checkouts; hawk's CMakeLists.txt (via
|
|
45
|
+
# hawk/_roots.py) resolves header roots from $HAWK_AETHER_INCLUDE /
|
|
46
|
+
# $HAWK_EAGLE_INCLUDE directly — no cmake --install step needed, these
|
|
47
|
+
# just need to point at the two repos' source roots.
|
|
48
|
+
- uses: actions/checkout@v7
|
|
49
|
+
with:
|
|
50
|
+
repository: amasat01/aether
|
|
51
|
+
path: aether
|
|
52
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
53
|
+
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
with:
|
|
56
|
+
repository: amasat01/eagle
|
|
57
|
+
path: eagle
|
|
58
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
59
|
+
|
|
60
|
+
- uses: actions/checkout@v7
|
|
61
|
+
with:
|
|
62
|
+
repository: amasat01/raptor
|
|
63
|
+
path: raptor
|
|
64
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
65
|
+
|
|
66
|
+
- uses: actions/setup-python@v7
|
|
67
|
+
with:
|
|
68
|
+
python-version: "3.12"
|
|
69
|
+
|
|
70
|
+
- run: sudo apt-get update && sudo apt-get install -y g++-13
|
|
71
|
+
|
|
72
|
+
# NVIDIA's apt repo for Ubuntu 24.04 (noble), x86_64. cuda-keyring adds
|
|
73
|
+
# the repo + signing key; package names/versions below are the current
|
|
74
|
+
# (as-authored) 12.6 set and are UNVERIFIED — not run on a live runner.
|
|
75
|
+
- name: Install compile-only CUDA 12.6 toolchain (nvcc; no driver/GPU)
|
|
76
|
+
run: |
|
|
77
|
+
curl -fsSL -o /tmp/cuda-keyring.deb \
|
|
78
|
+
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
|
|
79
|
+
sudo dpkg -i /tmp/cuda-keyring.deb
|
|
80
|
+
sudo apt-get update
|
|
81
|
+
# cuda-nvcc-12-6: nvcc/ptxas/cicc. cuda-cudart-dev-12-6: cuda_runtime.h
|
|
82
|
+
# + libcudart (nvcc auto-includes cuda_runtime.h even for -c-only
|
|
83
|
+
# compiles). cuda-driver-dev-12-6: the libcuda.so DRIVER STUB (under
|
|
84
|
+
# lib64/stubs, no actual driver) — added beyond the suggested pair
|
|
85
|
+
# because eagle's python/CMakeLists.txt links CUDA::cuda_driver.
|
|
86
|
+
sudo apt-get install -y --no-install-recommends \
|
|
87
|
+
cuda-nvcc-12-6 cuda-cudart-dev-12-6 cuda-driver-dev-12-6
|
|
88
|
+
echo "/usr/local/cuda-12.6/bin" >> "$GITHUB_PATH"
|
|
89
|
+
echo "CUDA_HOME=/usr/local/cuda-12.6" >> "$GITHUB_ENV"
|
|
90
|
+
|
|
91
|
+
# The siblings are not on PyPI yet: install aether's header package,
|
|
92
|
+
# raptor, and eagle's Python package (its _core builds against the
|
|
93
|
+
# aether + eagle headers installed into a local prefix).
|
|
94
|
+
- run: |
|
|
95
|
+
cmake -DAETHER_CPP_MODE=OFF -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
96
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install" \
|
|
97
|
+
-B aether/build -S aether
|
|
98
|
+
cmake --install aether/build
|
|
99
|
+
cmake -B eagle/__eagle_hdr -S eagle -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
100
|
+
-DCMAKE_CUDA_ARCHITECTURES=70 \
|
|
101
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install"
|
|
102
|
+
cmake --install eagle/__eagle_hdr
|
|
103
|
+
|
|
104
|
+
- run: |
|
|
105
|
+
python -m pip install --quiet --upgrade pip
|
|
106
|
+
python -m pip install --quiet ./aether/dsc ./raptor
|
|
107
|
+
export CMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/__install:${CMAKE_PREFIX_PATH}"
|
|
108
|
+
export SKBUILD_CMAKE_ARGS="-DCMAKE_CUDA_COMPILER=$(which nvcc);-DCMAKE_CUDA_ARCHITECTURES=70"
|
|
109
|
+
python -m pip install --quiet ./eagle/python
|
|
110
|
+
|
|
111
|
+
- env:
|
|
112
|
+
HAWK_AETHER_INCLUDE: ${{ github.workspace }}/aether
|
|
113
|
+
HAWK_EAGLE_INCLUDE: ${{ github.workspace }}/eagle
|
|
114
|
+
run: |
|
|
115
|
+
cd hawk
|
|
116
|
+
python -m pip install --quiet -e '.[test]'
|
|
117
|
+
|
|
118
|
+
- env:
|
|
119
|
+
HAWK_AETHER_INCLUDE: ${{ github.workspace }}/aether
|
|
120
|
+
HAWK_EAGLE_INCLUDE: ${{ github.workspace }}/eagle
|
|
121
|
+
run: cd hawk && python -m pytest tests -q -m "not gpu"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Copyright 2026 Alessandro Masat
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
#
|
|
4
|
+
# Builds the Sphinx docs and deploys them to GitHub Pages on push to main.
|
|
5
|
+
# Notebooks are executed LOCALLY and committed WITH outputs (docs/Makefile's
|
|
6
|
+
# `nbexec`); this job only checks they were (`nbcheck`) and renders them —
|
|
7
|
+
# conf.py sets nb_execution_mode = "off", so this job never re-executes one.
|
|
8
|
+
#
|
|
9
|
+
# Builds the same compiled stack ci.yml does (hawk._core needs aether/eagle
|
|
10
|
+
# headers to compile against, and autosummary needs the real package
|
|
11
|
+
# importable to introspect) -- see ci.yml for the toolchain notes this
|
|
12
|
+
# mirrors.
|
|
13
|
+
|
|
14
|
+
name: docs
|
|
15
|
+
|
|
16
|
+
on:
|
|
17
|
+
push:
|
|
18
|
+
branches: [main]
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read
|
|
26
|
+
pages: write
|
|
27
|
+
id-token: write
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
build:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
env:
|
|
33
|
+
CC: gcc-13
|
|
34
|
+
CXX: g++-13
|
|
35
|
+
HAWK_CXX: g++-13
|
|
36
|
+
HAWK_NVCC: /usr/local/cuda-12.6/bin/nvcc
|
|
37
|
+
HAWK_NVCC_CCBIN: /usr/bin/g++-13
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v7
|
|
40
|
+
with:
|
|
41
|
+
path: hawk
|
|
42
|
+
|
|
43
|
+
- uses: actions/checkout@v7
|
|
44
|
+
with:
|
|
45
|
+
repository: amasat01/aether
|
|
46
|
+
path: aether
|
|
47
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
48
|
+
|
|
49
|
+
- uses: actions/checkout@v7
|
|
50
|
+
with:
|
|
51
|
+
repository: amasat01/eagle
|
|
52
|
+
path: eagle
|
|
53
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
54
|
+
|
|
55
|
+
- uses: actions/checkout@v7
|
|
56
|
+
with:
|
|
57
|
+
repository: amasat01/raptor
|
|
58
|
+
path: raptor
|
|
59
|
+
token: ${{ secrets.SIBLING_READ_TOKEN || github.token }}
|
|
60
|
+
|
|
61
|
+
- uses: actions/setup-python@v7
|
|
62
|
+
with:
|
|
63
|
+
python-version: "3.12"
|
|
64
|
+
|
|
65
|
+
- run: sudo apt-get update && sudo apt-get install -y g++-13
|
|
66
|
+
|
|
67
|
+
- name: Install compile-only CUDA 12.6 toolchain (nvcc; no driver/GPU)
|
|
68
|
+
run: |
|
|
69
|
+
curl -fsSL -o /tmp/cuda-keyring.deb \
|
|
70
|
+
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
|
|
71
|
+
sudo dpkg -i /tmp/cuda-keyring.deb
|
|
72
|
+
sudo apt-get update
|
|
73
|
+
sudo apt-get install -y --no-install-recommends \
|
|
74
|
+
cuda-nvcc-12-6 cuda-cudart-dev-12-6 cuda-driver-dev-12-6
|
|
75
|
+
echo "/usr/local/cuda-12.6/bin" >> "$GITHUB_PATH"
|
|
76
|
+
echo "CUDA_HOME=/usr/local/cuda-12.6" >> "$GITHUB_ENV"
|
|
77
|
+
|
|
78
|
+
- run: |
|
|
79
|
+
cmake -DAETHER_CPP_MODE=OFF -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
80
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install" \
|
|
81
|
+
-B aether/build -S aether
|
|
82
|
+
cmake --install aether/build
|
|
83
|
+
cmake -B eagle/__eagle_hdr -S eagle -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
84
|
+
-DCMAKE_CUDA_ARCHITECTURES=70 \
|
|
85
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install"
|
|
86
|
+
cmake --install eagle/__eagle_hdr
|
|
87
|
+
|
|
88
|
+
- run: |
|
|
89
|
+
python -m pip install --quiet --upgrade pip
|
|
90
|
+
python -m pip install --quiet ./aether/dsc ./raptor
|
|
91
|
+
export CMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/__install:${CMAKE_PREFIX_PATH}"
|
|
92
|
+
export SKBUILD_CMAKE_ARGS="-DCMAKE_CUDA_COMPILER=$(which nvcc);-DCMAKE_CUDA_ARCHITECTURES=70"
|
|
93
|
+
python -m pip install --quiet ./eagle/python
|
|
94
|
+
|
|
95
|
+
- env:
|
|
96
|
+
HAWK_AETHER_INCLUDE: ${{ github.workspace }}/aether
|
|
97
|
+
HAWK_EAGLE_INCLUDE: ${{ github.workspace }}/eagle
|
|
98
|
+
run: |
|
|
99
|
+
cd hawk
|
|
100
|
+
python -m pip install --quiet -e '.[test]'
|
|
101
|
+
python -m pip install --quiet -r docs/requirements.txt
|
|
102
|
+
|
|
103
|
+
- name: make nbcheck
|
|
104
|
+
run: cd hawk/docs && make nbcheck
|
|
105
|
+
|
|
106
|
+
- name: make strict
|
|
107
|
+
run: cd hawk/docs && make strict
|
|
108
|
+
|
|
109
|
+
- uses: actions/upload-pages-artifact@v3
|
|
110
|
+
with:
|
|
111
|
+
path: hawk/docs/_build/html
|
|
112
|
+
|
|
113
|
+
deploy:
|
|
114
|
+
needs: build
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
environment:
|
|
117
|
+
name: github-pages
|
|
118
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
119
|
+
steps:
|
|
120
|
+
- name: Deploy to GitHub Pages
|
|
121
|
+
id: deployment
|
|
122
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# Copyright 2026 Alessandro Masat
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
#
|
|
4
|
+
# Publish raptor-hawk to PyPI through a Trusted Publisher (PyPI pending
|
|
5
|
+
# publisher: owner amasat01, GitHub environment "pypi"). No tokens, no
|
|
6
|
+
# secrets.
|
|
7
|
+
#
|
|
8
|
+
# Trigger: pushing a tag `v*` builds, checks, tests AND publishes.
|
|
9
|
+
# `workflow_dispatch` builds, checks and tests but never publishes.
|
|
10
|
+
#
|
|
11
|
+
# hawk._core is a HOST-ONLY nanobind extension (no CUDA language, no arch
|
|
12
|
+
# list, no nvcc — see hawk/CMakeLists.txt's header comment), so the only
|
|
13
|
+
# reason this needs cibuildwheel at all is the per-Python/ABI tag; there is
|
|
14
|
+
# no manylinux CUDA toolchain to provision. The build DOES need the aether
|
|
15
|
+
# and eagle C++ HEADER TREES on disk (`hawk/_roots.py` resolves
|
|
16
|
+
# $HAWK_AETHER_INCLUDE / $HAWK_EAGLE_INCLUDE directly against source
|
|
17
|
+
# checkouts — no `cmake --install` step, per hawk's own ci.yml), so the
|
|
18
|
+
# manylinux container is given the two sibling checkouts as extra bind
|
|
19
|
+
# mounts (`CIBW_CONTAINER_ENGINE: ... create_args: --volume ...`) — this
|
|
20
|
+
# construct was authored and YAML-validated offline against cibuildwheel's
|
|
21
|
+
# documented container-engine create_args option; it has not been run on a
|
|
22
|
+
# live runner (no docker was available where this was written).
|
|
23
|
+
#
|
|
24
|
+
# Release order across the family: hawk needs aether-dsc. test-wheel
|
|
25
|
+
# installs the aether-dsc release matching the requirement the built wheel
|
|
26
|
+
# declares from PyPI when one exists (what a user gets), and only otherwise
|
|
27
|
+
# seals and builds it from the sibling aether checkout, so this workflow
|
|
28
|
+
# works before AND after the family's first release. The sibling
|
|
29
|
+
# repositories are public: the default GITHUB_TOKEN checks them out.
|
|
30
|
+
|
|
31
|
+
name: Publish
|
|
32
|
+
|
|
33
|
+
on:
|
|
34
|
+
push:
|
|
35
|
+
tags: ["v*"]
|
|
36
|
+
workflow_dispatch: {}
|
|
37
|
+
|
|
38
|
+
concurrency:
|
|
39
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
40
|
+
cancel-in-progress: true
|
|
41
|
+
|
|
42
|
+
jobs:
|
|
43
|
+
build:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v7
|
|
47
|
+
with:
|
|
48
|
+
path: hawk
|
|
49
|
+
|
|
50
|
+
- uses: actions/checkout@v7
|
|
51
|
+
with:
|
|
52
|
+
repository: amasat01/aether
|
|
53
|
+
path: aether
|
|
54
|
+
|
|
55
|
+
- uses: actions/checkout@v7
|
|
56
|
+
with:
|
|
57
|
+
repository: amasat01/eagle
|
|
58
|
+
path: eagle
|
|
59
|
+
|
|
60
|
+
- uses: actions/setup-python@v7
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.12"
|
|
63
|
+
|
|
64
|
+
- run: python -m pip install --quiet build
|
|
65
|
+
|
|
66
|
+
# sdist first: pure-python-looking metadata, but scikit-build-core's
|
|
67
|
+
# sdist still needs the two header roots to stamp hawk's build digest
|
|
68
|
+
# at configure time (CMakeLists.txt point 3) — only the compiled
|
|
69
|
+
# wheels are built through cibuildwheel below.
|
|
70
|
+
- name: Build the sdist
|
|
71
|
+
env:
|
|
72
|
+
HAWK_AETHER_INCLUDE: ${{ github.workspace }}/aether
|
|
73
|
+
HAWK_EAGLE_INCLUDE: ${{ github.workspace }}/eagle
|
|
74
|
+
run: cd hawk && python -m build --sdist --outdir ../dist
|
|
75
|
+
|
|
76
|
+
- name: Build manylinux wheels (cibuildwheel; CPython 3.10-3.13, x86_64)
|
|
77
|
+
uses: pypa/cibuildwheel@v4.2.1
|
|
78
|
+
with:
|
|
79
|
+
package-dir: hawk
|
|
80
|
+
output-dir: dist
|
|
81
|
+
env:
|
|
82
|
+
CIBW_BUILD: "cp310-manylinux_x86_64 cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64"
|
|
83
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
|
84
|
+
CIBW_BUILD_FRONTEND: build
|
|
85
|
+
# Extra bind mounts: the sibling header trees are not inside
|
|
86
|
+
# package-dir, so cibuildwheel's default per-package-dir copy
|
|
87
|
+
# never sees them without this.
|
|
88
|
+
CIBW_CONTAINER_ENGINE: "docker; create_args: --volume ${{ github.workspace }}/aether:/sib/aether:ro --volume ${{ github.workspace }}/eagle:/sib/eagle:ro"
|
|
89
|
+
CIBW_ENVIRONMENT_LINUX: "HAWK_AETHER_INCLUDE=/sib/aether HAWK_EAGLE_INCLUDE=/sib/eagle CMAKE_BUILD_PARALLEL_LEVEL=2"
|
|
90
|
+
# The dedicated test-wheel job below (with the aether-dsc sibling
|
|
91
|
+
# wheel + the repo's own test suite) replaces cibuildwheel's
|
|
92
|
+
# built-in --test-command; skip it here to avoid solving sibling
|
|
93
|
+
# install twice.
|
|
94
|
+
CIBW_TEST_SKIP: "*"
|
|
95
|
+
|
|
96
|
+
- uses: actions/upload-artifact@v7
|
|
97
|
+
with:
|
|
98
|
+
name: raptor-hawk-dist
|
|
99
|
+
path: dist/
|
|
100
|
+
|
|
101
|
+
check:
|
|
102
|
+
needs: build
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/download-artifact@v8
|
|
106
|
+
with:
|
|
107
|
+
name: raptor-hawk-dist
|
|
108
|
+
path: dist
|
|
109
|
+
- uses: actions/setup-python@v7
|
|
110
|
+
with:
|
|
111
|
+
python-version: "3.12"
|
|
112
|
+
- run: python -m pip install --quiet "twine>=6" packaging
|
|
113
|
+
- run: python -m twine check --strict dist/*
|
|
114
|
+
- name: tag == version guard (every wheel + the sdist must agree)
|
|
115
|
+
if: github.ref_type == 'tag'
|
|
116
|
+
run: |
|
|
117
|
+
python - <<'EOF'
|
|
118
|
+
import glob, os
|
|
119
|
+
from packaging.utils import parse_wheel_filename, parse_sdist_filename
|
|
120
|
+
tag = os.environ["GITHUB_REF_NAME"]
|
|
121
|
+
assert tag.startswith("v"), f"tag {tag!r} does not start with 'v'"
|
|
122
|
+
want = tag[1:]
|
|
123
|
+
seen = set()
|
|
124
|
+
for whl in glob.glob("dist/*.whl"):
|
|
125
|
+
_, version, _, _ = parse_wheel_filename(os.path.basename(whl))
|
|
126
|
+
seen.add(str(version))
|
|
127
|
+
for sdist in glob.glob("dist/*.tar.gz"):
|
|
128
|
+
_, version = parse_sdist_filename(os.path.basename(sdist))
|
|
129
|
+
seen.add(str(version))
|
|
130
|
+
assert seen == {want}, f"tag v{want} vs dist versions {seen}"
|
|
131
|
+
print(f"OK: tag v{want} == {len(seen)} agreeing dist version(s)")
|
|
132
|
+
EOF
|
|
133
|
+
|
|
134
|
+
test-wheel:
|
|
135
|
+
needs: check
|
|
136
|
+
runs-on: ubuntu-latest
|
|
137
|
+
strategy:
|
|
138
|
+
matrix:
|
|
139
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
140
|
+
# The suite's toolchain, exactly as ci.yml's test job sets it: the
|
|
141
|
+
# fixture kernels build for BOTH the host and the cuda target (nvcc AOT
|
|
142
|
+
# compile only, never executed), so a compile-only CUDA 12.6 toolchain
|
|
143
|
+
# and g++-13 are installed below.
|
|
144
|
+
env:
|
|
145
|
+
CC: gcc-13
|
|
146
|
+
CXX: g++-13
|
|
147
|
+
HAWK_CXX: g++-13
|
|
148
|
+
HAWK_NVCC: /usr/local/cuda-12.6/bin/nvcc
|
|
149
|
+
HAWK_NVCC_CCBIN: /usr/bin/g++-13
|
|
150
|
+
steps:
|
|
151
|
+
- uses: actions/checkout@v7
|
|
152
|
+
with:
|
|
153
|
+
path: hawk
|
|
154
|
+
- uses: actions/checkout@v7
|
|
155
|
+
with:
|
|
156
|
+
repository: amasat01/aether
|
|
157
|
+
path: aether
|
|
158
|
+
- uses: actions/checkout@v7
|
|
159
|
+
with:
|
|
160
|
+
repository: amasat01/eagle
|
|
161
|
+
path: eagle
|
|
162
|
+
- uses: actions/checkout@v7
|
|
163
|
+
with:
|
|
164
|
+
repository: amasat01/raptor
|
|
165
|
+
path: raptor
|
|
166
|
+
- uses: actions/download-artifact@v8
|
|
167
|
+
with:
|
|
168
|
+
name: raptor-hawk-dist
|
|
169
|
+
path: dist
|
|
170
|
+
- uses: actions/setup-python@v7
|
|
171
|
+
with:
|
|
172
|
+
python-version: ${{ matrix.python-version }}
|
|
173
|
+
|
|
174
|
+
# aether-dsc, hawk's one runtime dependency, resolved against the
|
|
175
|
+
# requirement the BUILT wheel declares: from PyPI when a matching
|
|
176
|
+
# release exists (what a user gets), otherwise sealed and built from
|
|
177
|
+
# the sibling aether checkout (before the family's first release).
|
|
178
|
+
# Sealing runs the NVRTC-clean gate, so that branch needs NVRTC plus
|
|
179
|
+
# the CCCL headers from PyPI (the runner has no CUDA toolkit).
|
|
180
|
+
- name: aether-dsc wheel (PyPI if released, else the sibling checkout)
|
|
181
|
+
run: |
|
|
182
|
+
set -euo pipefail
|
|
183
|
+
python -m pip install --quiet build
|
|
184
|
+
REQ="$(python - <<'PY'
|
|
185
|
+
import glob, zipfile
|
|
186
|
+
whl = sorted(glob.glob("dist/*.whl"))[0]
|
|
187
|
+
with zipfile.ZipFile(whl) as z:
|
|
188
|
+
meta = next(n for n in z.namelist() if n.endswith(".dist-info/METADATA"))
|
|
189
|
+
for line in z.read(meta).decode().splitlines():
|
|
190
|
+
if line.startswith("Requires-Dist:") and "aether-dsc" in line and "extra ==" not in line:
|
|
191
|
+
print(line.split(":", 1)[1].strip()); break
|
|
192
|
+
else:
|
|
193
|
+
raise SystemExit(f"{whl} declares no aether-dsc requirement")
|
|
194
|
+
PY
|
|
195
|
+
)"
|
|
196
|
+
echo "hawk requires: $REQ"
|
|
197
|
+
mkdir -p dist-dsc
|
|
198
|
+
if python -m pip download --quiet --no-deps --only-binary=:all: -d dist-dsc "$REQ"; then
|
|
199
|
+
echo "aether-dsc: from PyPI"
|
|
200
|
+
else
|
|
201
|
+
echo "aether-dsc: not on PyPI yet, building it from the sibling checkout"
|
|
202
|
+
python -m pip install --quiet "cuda-bindings" "nvidia-cuda-nvrtc-cu12" "nvidia-cuda-cccl-cu12"
|
|
203
|
+
(cd aether/dsc && python -m aether_dsc.seal && python -m build --wheel --outdir ../../dist-dsc)
|
|
204
|
+
fi
|
|
205
|
+
ls dist-dsc
|
|
206
|
+
|
|
207
|
+
- run: sudo apt-get update && sudo apt-get install -y g++-13
|
|
208
|
+
|
|
209
|
+
- name: Install compile-only CUDA 12.6 toolchain (nvcc; no driver/GPU)
|
|
210
|
+
run: |
|
|
211
|
+
curl -fsSL -o /tmp/cuda-keyring.deb \
|
|
212
|
+
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
|
|
213
|
+
sudo dpkg -i /tmp/cuda-keyring.deb
|
|
214
|
+
sudo apt-get update
|
|
215
|
+
sudo apt-get install -y --no-install-recommends \
|
|
216
|
+
cuda-nvcc-12-6 cuda-cudart-dev-12-6 cuda-driver-dev-12-6
|
|
217
|
+
echo "/usr/local/cuda-12.6/bin" >> "$GITHUB_PATH"
|
|
218
|
+
echo "CUDA_HOME=/usr/local/cuda-12.6" >> "$GITHUB_ENV"
|
|
219
|
+
|
|
220
|
+
# eagle and raptor-core are TEST-only for hawk (the suite drives
|
|
221
|
+
# kernels through eagle; neither is a declared dependency). Same rule
|
|
222
|
+
# as aether-dsc: the released wheels from PyPI when they exist, else
|
|
223
|
+
# built from the sibling checkouts the way ci.yml builds them.
|
|
224
|
+
- name: eagle + raptor-core wheels (PyPI if released, else the sibling checkouts)
|
|
225
|
+
run: |
|
|
226
|
+
set -euo pipefail
|
|
227
|
+
mkdir -p dist-sib
|
|
228
|
+
if python -m pip download --quiet --only-binary=:all: -d dist-sib raptor-eagle; then
|
|
229
|
+
echo "raptor-eagle (+ raptor-core): from PyPI"
|
|
230
|
+
else
|
|
231
|
+
echo "raptor-eagle: not on PyPI yet, building it from the sibling checkouts"
|
|
232
|
+
cmake -DAETHER_CPP_MODE=OFF -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
233
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install" \
|
|
234
|
+
-B aether/build -S aether
|
|
235
|
+
cmake --install aether/build
|
|
236
|
+
cmake -B eagle/__eagle_hdr -S eagle -DCMAKE_CUDA_COMPILER="$(which nvcc)" \
|
|
237
|
+
-DCMAKE_CUDA_ARCHITECTURES=70 \
|
|
238
|
+
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/__install"
|
|
239
|
+
cmake --install eagle/__eagle_hdr
|
|
240
|
+
export CMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/__install"
|
|
241
|
+
export SKBUILD_CMAKE_ARGS="-DCMAKE_CUDA_COMPILER=$(which nvcc);-DCMAKE_CUDA_ARCHITECTURES=70"
|
|
242
|
+
(cd eagle/python && python -m build --wheel --outdir ../../dist-sib)
|
|
243
|
+
if ! python -m pip download --quiet --no-deps --only-binary=:all: -d dist-sib raptor-core; then
|
|
244
|
+
(cd raptor && python -m build --wheel --outdir ../dist-sib)
|
|
245
|
+
fi
|
|
246
|
+
fi
|
|
247
|
+
ls dist-sib
|
|
248
|
+
|
|
249
|
+
# Three installs, so each piece provably comes from where it should:
|
|
250
|
+
# aether-dsc from dist-dsc, raptor-hawk from THIS run's dist (never an
|
|
251
|
+
# index copy of the same version), then the [test] extras from PyPI
|
|
252
|
+
# (pytest, numpy, scipy are third-party; hawk is already satisfied)
|
|
253
|
+
# together with the test-only eagle (+ raptor-core) from dist-sib.
|
|
254
|
+
- name: Fresh venv, install hawk + aether-dsc, pip check
|
|
255
|
+
run: |
|
|
256
|
+
set -euo pipefail
|
|
257
|
+
python -m venv venv
|
|
258
|
+
. venv/bin/activate
|
|
259
|
+
pip install --quiet --no-index --find-links dist-dsc aether-dsc
|
|
260
|
+
# hawk's one third-party runtime dependency comes from PyPI; hawk and
|
|
261
|
+
# aether-dsc themselves only from the wheels built in this run
|
|
262
|
+
pip install --quiet numpy
|
|
263
|
+
pip install --quiet --no-index --find-links dist --find-links dist-dsc raptor-hawk
|
|
264
|
+
pip install --quiet --find-links dist --find-links dist-sib "raptor-hawk[test]" raptor-eagle
|
|
265
|
+
pip check
|
|
266
|
+
|
|
267
|
+
- name: Import smoke (the import-time build-digest/layout self-check runs here)
|
|
268
|
+
run: |
|
|
269
|
+
. venv/bin/activate
|
|
270
|
+
python - <<'EOF'
|
|
271
|
+
import hawk, pathlib, sys
|
|
272
|
+
print("hawk", hawk.__version__, hawk.__file__)
|
|
273
|
+
assert pathlib.Path(hawk.__file__).is_relative_to(sys.prefix), hawk.__file__
|
|
274
|
+
EOF
|
|
275
|
+
|
|
276
|
+
- name: The repo's own non-GPU suite (a copy outside the repo, against the installed wheel)
|
|
277
|
+
env:
|
|
278
|
+
HAWK_AETHER_INCLUDE: ${{ github.workspace }}/aether
|
|
279
|
+
HAWK_EAGLE_INCLUDE: ${{ github.workspace }}/eagle
|
|
280
|
+
run: |
|
|
281
|
+
. venv/bin/activate
|
|
282
|
+
mkdir -p suite
|
|
283
|
+
cp -r hawk/tests suite/tests
|
|
284
|
+
cp hawk/pyproject.toml suite/pyproject.toml
|
|
285
|
+
cd suite
|
|
286
|
+
python -m pytest tests -q -m "not gpu and not repo_local"
|
|
287
|
+
|
|
288
|
+
publish:
|
|
289
|
+
if: github.event_name == 'push' && github.ref_type == 'tag'
|
|
290
|
+
needs: [check, test-wheel]
|
|
291
|
+
runs-on: ubuntu-latest
|
|
292
|
+
environment:
|
|
293
|
+
name: pypi
|
|
294
|
+
url: https://pypi.org/p/raptor-hawk
|
|
295
|
+
permissions:
|
|
296
|
+
id-token: write
|
|
297
|
+
steps:
|
|
298
|
+
- uses: actions/download-artifact@v8
|
|
299
|
+
with:
|
|
300
|
+
name: raptor-hawk-dist
|
|
301
|
+
path: dist
|
|
302
|
+
- uses: pypa/gh-action-pypi-publish@v1.14.2
|
|
303
|
+
with:
|
|
304
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Alessandro Masat
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
**/__pycache__/
|
|
5
|
+
**/*.py[cod]
|
|
6
|
+
**/*.egg-info/
|
|
7
|
+
**/.pytest_cache/
|
|
8
|
+
**/.ruff_cache/
|
|
9
|
+
**/build/
|
|
10
|
+
**/_build/*
|
|
11
|
+
**/dist/
|
|
12
|
+
*.egg
|
|
13
|
+
# an in-place build of the extension
|
|
14
|
+
hawk/_core*.so
|
|
15
|
+
|
|
16
|
+
# Sphinx autosummary output (regenerated on every build)
|
|
17
|
+
docs/content/api/generated/
|