[Graph] Add qd.checkpoint#725
Open
hughperkins wants to merge 95 commits into
Open
GitHub Actions / PR change report
succeeded
Jun 18, 2026 in 0s
PR change report
Per-file totals + per-function breakdown of code-line additions and removals.
Details
PR change report (3b849362e)
Per-file totals + per-function breakdown of code-line additions and removals.
Code lines exclude blank lines, comment-only lines, and Python multi-line strings.
| File | LoC | Added | Removed |
|---|---|---|---|
quadrants/runtime/amdgpu/checkpoint_yield_check_hsaco.h |
0 | +4813 | |
quadrants/runtime/cuda/checkpoint_yield_check_fatbin.h |
0 | +1507 | |
quadrants/runtime/cuda/graph_do_while_cond_fatbin.h |
1288 | +1132 | -1034 |
quadrants/runtime/cuda/checkpoint_gate_fatbin.h |
0 | +867 | |
tests/python/test_checkpoint.py |
0 | +555 | |
quadrants/runtime/cuda/graph_manager.cpp |
358 | +293 | -32 |
quadrants/runtime/gfx/checkpoint_launch.cpp |
0 | +269 | |
quadrants/runtime/amdgpu/graph_manager.cpp |
206 | +217 | -25 |
python/quadrants/lang/ast/ast_transformers/checkpoint_transformer.py |
0 | +179 | |
tests/python/test_checkpoint_resume_offset.py |
0 | +174 | |
quadrants/runtime/amdgpu/kernel_launcher.cpp |
390 | +158 | -6 |
quadrants/runtime/cpu/kernel_launcher.cpp |
182 | +92 | -18 |
scripts/build_checkpoint_yield_check_hsaco.py |
0 | +85 | |
quadrants/codegen/spirv/checkpoint_gate_shader.cpp |
0 | +82 | |
scripts/build_checkpoint_gate_fatbin.py |
0 | +63 | |
scripts/build_checkpoint_yield_check_fatbin.py |
0 | +63 | |
quadrants/runtime/cuda/graph_manager_checkpoint.cpp |
0 | +56 | |
quadrants/codegen/llvm/codegen_llvm_checkpoint.cpp |
0 | +48 | |
quadrants/codegen/spirv/checkpoint_yield_check_shader.cpp |
0 | +47 | |
quadrants/runtime/gfx/runtime.h |
169 | +43 | |
quadrants/runtime/gfx/runtime.cpp |
938 | +41 | -6 |
python/quadrants/lang/kernel.py |
595 | +40 | -3 |
python/quadrants/lang/kernel_checkpoint.py |
0 | +37 | |
quadrants/rhi/vulkan/vulkan_device.cpp |
2060 | +36 | -20 |
quadrants/runtime/amdgpu/graph_manager.h |
85 | +30 | -2 |
quadrants/runtime/cuda/graph_manager.h |
111 | +27 | -1 |
python/quadrants/lang/ast/ast_transformers/function_def_transformer.py |
511 | +25 | |
tests/cpp/codegen/checkpoint_gate_shader_test.cpp |
0 | +25 | |
tests/cpp/codegen/checkpoint_yield_check_shader_test.cpp |
0 | +25 | |
quadrants/codegen/spirv/checkpoint_gate_shader.h |
0 | +19 | |
quadrants/runtime/cuda/checkpoint_yield_check.cu |
0 | +19 | |
python/quadrants/lang/ast/ast_transformer.py |
1311 | +18 | -1 |
quadrants/ir/frontend_ir.h |
829 | +14 | |
quadrants/runtime/amdgpu/kernel_launcher.h |
54 | +14 | |
quadrants/runtime/cpu/kernel_launcher.h |
46 | +13 | -9 |
quadrants/codegen/spirv/checkpoint_yield_check_shader.h |
0 | +13 | |
python/quadrants/lang/kernel_impl.py |
173 | +12 | -3 |
quadrants/runtime/cuda/graph_do_while_cond.cu |
6 | +11 | |
python/quadrants/lang/graph_status.py |
0 | +10 | |
quadrants/runtime/gfx/kernel_launcher.cpp |
73 | +9 | |
quadrants/python/export_lang.cpp |
1065 | +8 | -2 |
quadrants/runtime/cuda/checkpoint_gate.cu |
0 | +8 | |
quadrants/ir/frontend_ir.cpp |
1497 | +7 | -1 |
python/quadrants/lang/_quadrants_callable.py |
42 | +7 | |
quadrants/codegen/llvm/llvm_compiled_data.h |
117 | +6 | -2 |
python/quadrants/lang/checkpoint.py |
0 | +6 | |
quadrants/ir/statements.h |
1325 | +6 | |
quadrants/program/kernel_launcher.h |
23 | +6 | |
quadrants/program/program.h |
211 | +6 | |
quadrants/runtime/cuda/kernel_launcher.h |
53 | +6 | |
quadrants/ir/ir.h |
500 | +5 | -1 |
python/quadrants/lang/misc.py |
403 | +4 | |
quadrants/codegen/amdgpu/codegen_amdgpu.cpp |
504 | +4 | |
quadrants/codegen/cuda/codegen_cuda.cpp |
674 | +4 | |
quadrants/rhi/public_device.h |
518 | +4 | |
quadrants/codegen/spirv/spirv_codegen.cpp |
2568 | +3 | |
quadrants/ir/statements.cpp |
396 | +3 | |
quadrants/program/launch_context_builder.h |
115 | +3 | |
quadrants/runtime/gfx/kernel_launcher.h |
20 | +3 | |
quadrants/transforms/lower_ast.cpp |
432 | +3 | |
quadrants/transforms/offload.cpp |
626 | +3 | |
python/quadrants/lang/__init__.py |
51 | +2 | |
quadrants/analysis/gen_offline_cache_key.cpp |
569 | +2 | |
quadrants/codegen/spirv/kernel_utils.h |
221 | +2 | |
quadrants/program/context.h |
17 | +2 | |
tests/python/test_api.py |
505 | +2 | |
scripts/build_condition_kernel_fatbin.py |
63 | +1 | -1 |
quadrants/codegen/cpu/codegen_cpu.cpp |
252 | +1 | |
quadrants/codegen/llvm/codegen_llvm.h |
268 | +1 | |
quadrants/rhi/metal/metal_device.h |
427 | +1 | |
quadrants/rhi/vulkan/vulkan_device.h |
574 | +1 | |
quadrants/codegen/llvm/codegen_llvm.cpp |
2678 |
Total: 72 file(s) changed, +11301 -1167 code lines.
Per-function breakdown
quadrants/runtime/amdgpu/checkpoint_yield_check_hsaco.h 0 +4813
New:
<module>() 0 +4813
quadrants/runtime/cuda/checkpoint_yield_check_fatbin.h 0 +1507
New:
<module>() 0 +1507
quadrants/runtime/cuda/graph_do_while_cond_fatbin.h 1288 +1132 -1034
Existing:
<module>() 1288 +1132 -1034
quadrants/runtime/cuda/checkpoint_gate_fatbin.h 0 +867
New:
<module>() 0 +867
tests/python/test_checkpoint.py 0 +555
New:
test_canonical_yield_resume_loop() 0 +32
test_resume_by_intenum_label_round_trip() 0 +28
test_checkpoint_yield_exits_graph_do_while_early() 0 +26
test_checkpoint_yield_first_wins_subsequent_skipped() 0 +26
test_autowrap_recurses_into_graph_do_while_body() 0 +25
test_checkpoint_inside_graph_do_while_completes_when_no_yield() 0 +23
test_resume_by_int_label_skips_implicit_and_explicit_before() 0 +23
test_autowrap_mixes_explicit_and_implicit_in_source_order() 0 +22
test_checkpoint_yields_when_flag_is_set() 0 +21
test_checkpoint_emits_if_nodes_on_cuda_native() 0 +20
test_checkpoint_yield_does_not_clear_user_flag() 0 +19
test_intenum_label_resolves_to_internal_cp_id() 0 +18
test_checkpoint_no_yield_when_flag_is_zero() 0 +17
test_autowrap_assigns_implicit_cp_id_per_for_loop() 0 +16
test_resume_unknown_label_raises() 0 +16
test_autowrap_leaves_kernel_prologue_alone() 0 +15
test_checkpoint_docstring_allowed() 0 +13
test_checkpoint_duplicate_cp_id_raises() 0 +13
test_resume_non_int_arg_raises() 0 +12
test_checkpoint_nested_raises() 0 +11
_supports_checkpoint_yield_resume() 0 +10
test_checkpoint_in_non_checkpoints_kernel_raises() 0 +10
test_checkpoint_non_int_cp_id_raises() 0 +10
test_checkpoint_unexpected_kwarg_raises() 0 +10
test_checkpoint_yield_on_must_be_bare_name() 0 +10
test_checkpoint_yield_on_nonexistent_arg_raises() 0 +10
test_checkpoint_bare_assign_error_message_suggests_for_wrap() 0 +9
test_checkpoint_bare_assign_raises() 0 +9
test_checkpoint_missing_cp_id_raises() 0 +9
test_checkpoint_missing_yield_on_raises() 0 +9
test_checkpoint_is_no_op_outside_kernels() 0 +7
<module>() 0 +6
test_kernel_checkpoints_requires_graph_true() 0 +6
_is_checkpoint_if_path_native() 0 +2
_last_yield_cp_id_on_last_call() 0 +2
_num_checkpoints_on_last_call() 0 +2
_on_cuda() 0 +2
_supports_checkpoint_yield_resume_in_while_loop() 0 +2
# note: per-function +/- differs from file totals by added_drift=+34 removed_drift=+0
quadrants/runtime/cuda/graph_manager.cpp 358 +293 -32
New:
GraphManager::ensure_checkpoint_gate_kernel_loaded() 0 +20
GraphManager::ensure_checkpoint_yield_check_kernel_loaded() 0 +17
GraphManager::ensure_cond_with_yield_kernel_loaded() 0 +9
Existing:
GraphManager::build_level() 42 +89 -11
GraphManager::try_launch() 75 +88 -21
GraphManager::launch_cached_graph() 18 +24
CachedGraph::CachedGraph() 44 +21
CachedGraph::~CachedGraph() 22 +11
GraphManager::resolve_ctx_ndarray_ptrs() 37 +6
<module>() 6 +4
CachedGraph::operator=() 14 +4
quadrants/runtime/gfx/checkpoint_launch.cpp 0 +269
New:
GfxRuntime::ensure_checkpoint_state_for_handle() 0 +79
GfxRuntime::prepare_checkpoint_launch_state() 0 +56
GfxRuntime::finalize_checkpoint_readback() 0 +30
GfxRuntime::dispatch_checkpoint_yield_check() 0 +24
ensure_yield_check_pipeline() 0 +16
alloc_small_ssbo() 0 +15
GfxRuntime::dispatch_checkpoint_gate() 0 +14
ensure_gate_pipeline() 0 +14
upload_u32_words() 0 +7
# note: per-function +/- differs from file totals by added_drift=+14 removed_drift=+0
quadrants/runtime/amdgpu/graph_manager.cpp 206 +217 -25
New:
GraphManager::ensure_checkpoint_yield_check_kernel_loaded() 0 +16
GraphManager::initialize_yield_check_kernel_args() 0 +14
rebind_kernel_args_self() 0 +7
initialize_body_kernel_args() 0 +5
Existing:
GraphManager::try_launch() 54 +76 -9
GraphManager::launch_cached_graph() 11 +33 -1
CachedGraph::CachedGraph() 37 +28 -11
<module>() 12 +23 -1
CachedGraph::operator=() 17 +14 -4
CachedGraph::~CachedGraph() 14 +11
GraphManager::resolve_ctx_ndarray_ptrs() 37 +6
# note: per-function +/- differs from file totals by added_drift=-16 removed_drift=-1
python/quadrants/lang/ast/ast_transformers/checkpoint_transformer.py 0 +179
New:
CheckpointTransformer.build_checkpoint_with() 0 +52
CheckpointTransformer.is_checkpoint_call() 0 +40
CheckpointTransformer._make_implicit_checkpoint_with() 0 +18
CheckpointTransformer._resolve_cp_id() 0 +17
CheckpointTransformer.auto_wrap_for_loops() 0 +13
<module>() 0 +12
CheckpointTransformer._is_coverage_probe_assign() 0 +7
CheckpointTransformer._looks_like_checkpoint_call() 0 +7
CheckpointTransformer.is_explicit_checkpoint_with() 0 +4
# note: per-function +/- differs from file totals by added_drift=+9 removed_drift=+0
tests/python/test_checkpoint_resume_offset.py 0 +174
New:
test_resume_offset_loop_next() 0 +39
test_resume_offset_loop_this() 0 +35
test_resume_offset_sequential_next() 0 +33
test_resume_offset_sequential_this() 0 +29
_make_buffers() 0 +15
_supports_checkpoint_yield_resume() 0 +10
_supports_checkpoint_yield_resume_in_while_loop() 0 +3
# note: per-function +/- differs from file totals by added_drift=+10 removed_drift=+0
quadrants/runtime/amdgpu/kernel_launcher.cpp 390 +158 -6
New:
KernelLauncher::prepare_streaming_checkpoint_state() 0 +54
KernelLauncher::launch_streaming_yield_check_kernel() 0 +21
KernelLauncher::fetch_streaming_yield_signal() 0 +9
Existing:
KernelLauncher::launch_offloaded_tasks_with_do_while() 34 +22 -3
KernelLauncher::launch_llvm_kernel() 171 +20 -2
KernelLauncher::launch_offloaded_tasks() 113 +19 -1
KernelLauncher::~KernelLauncher() 13 +11
<module>() 2 +2
quadrants/runtime/cpu/kernel_launcher.cpp 182 +92 -18
New:
KernelLauncher::run_gated_task() 0 +32
Existing:
KernelLauncher::launch_llvm_kernel() 33 +23 -3
KernelLauncher::launch_offloaded_tasks_with_do_while() 24 +16 -8
KernelLauncher::register_llvm_kernel() 46 +15
KernelLauncher::launch_offloaded_tasks() 12 +6 -7
scripts/build_checkpoint_yield_check_hsaco.py 0 +85
New:
generate_header() 0 +25
main() 0 +20
find_hipcc() 0 +15
run() 0 +3
# note: per-function +/- differs from file totals by added_drift=+22 removed_drift=+0
quadrants/codegen/spirv/checkpoint_gate_shader.cpp 0 +82
New:
build_checkpoint_gate_spirv() 0 +68
store_buf_u32() 0 +4
# note: per-function +/- differs from file totals by added_drift=+10 removed_drift=+0
scripts/build_checkpoint_gate_fatbin.py 0 +63
New:
generate_header() 0 +25
main() 0 +14
find_nvcc() 0 +10
run() 0 +3
# note: per-function +/- differs from file totals by added_drift=+11 removed_drift=+0
scripts/build_checkpoint_yield_check_fatbin.py 0 +63
New:
generate_header() 0 +25
main() 0 +14
find_nvcc() 0 +10
run() 0 +3
# note: per-function +/- differs from file totals by added_drift=+11 removed_drift=+0
quadrants/runtime/cuda/graph_manager_checkpoint.cpp 0 +56
New:
GraphManager::ensure_checkpoint_gate_kernel_loaded() 0 +20
GraphManager::ensure_checkpoint_yield_check_kernel_loaded() 0 +17
GraphManager::ensure_cond_with_yield_kernel_loaded() 0 +9
# note: per-function +/- differs from file totals by added_drift=+10 removed_drift=+0
quadrants/codegen/llvm/codegen_llvm_checkpoint.cpp 0 +48
New:
TaskCodeGenLLVM::emit_checkpoint_gate_prologue() 0 +43
quadrants/codegen/spirv/checkpoint_yield_check_shader.cpp 0 +47
New:
build_checkpoint_yield_check_spirv() 0 +36
# note: per-function +/- differs from file totals by added_drift=+11 removed_drift=+0
quadrants/runtime/gfx/runtime.h 169 +43
Existing:
<module>() 91 +43
quadrants/runtime/gfx/runtime.cpp 938 +41 -6
Existing:
GfxRuntime::launch_kernel() 376 +41 -6
python/quadrants/lang/kernel.py 595 +40 -3
New:
<module>() 0 +1
Existing:
Kernel.__call__() 30 +24 -2
Kernel.launch_kernel() 101 +12
Kernel.__init__() 27 +3
python/quadrants/lang/kernel_checkpoint.py 0 +37
New:
maybe_build_graph_status() 0 +10
translate_user_label_to_internal_cp_id() 0 +7
maybe_record_yield_on_arg() 0 +6
validate_resume_cookie() 0 +4
forward_yield_on_table_to_ctx() 0 +3
init_yield_on_arg_id_table() 0 +3
quadrants/rhi/vulkan/vulkan_device.cpp 2060 +36 -20
New:
VulkanCommandList::dispatch_indirect() 0 +9
Existing:
VulkanCommandList::buffer_barrier() 31 +12 -10
VulkanCommandList::memory_barrier() 18 +12 -10
VulkanDevice::allocate_memory() 21 +3
quadrants/runtime/amdgpu/graph_manager.h 85 +30 -2
New:
GraphManager::ensure_and_get_checkpoint_yield_check_kernel() 0 +4
GraphManager::last_yield_cp_id_on_last_call() 0 +3
GraphManager::set_last_yield_cp_id_on_last_call() 0 +3
Existing:
<module>() 40 +30 -2
# note: per-function +/- differs from file totals by added_drift=-10 removed_drift=+0
quadrants/runtime/cuda/graph_manager.h 111 +27 -1
New:
GraphManager::last_yield_cp_id_on_last_call() 0 +3
GraphManager::num_checkpoints_on_last_call() 0 +3
Existing:
<module>() 53 +27 -1
# note: per-function +/- differs from file totals by added_drift=-6 removed_drift=+0
python/quadrants/lang/ast/ast_transformers/function_def_transformer.py 511 +25
New:
FunctionDefTransformer._is_checkpoint_with() 0 +12
FunctionDefTransformer._validate_graph_do_while_stmt_list() 0 +3
Existing:
FunctionDefTransformer.build_FunctionDef() 27 +6
<module>() 6 +3
tests/cpp/codegen/checkpoint_gate_shader_test.cpp 0 +25
New:
TEST() 0 +18
# note: per-function +/- differs from file totals by added_drift=+7 removed_drift=+0
tests/cpp/codegen/checkpoint_yield_check_shader_test.cpp 0 +25
New:
TEST() 0 +17
# note: per-function +/- differs from file totals by added_drift=+8 removed_drift=+0
quadrants/codegen/spirv/checkpoint_gate_shader.h 0 +19
New:
<module>() 0 +19
quadrants/runtime/cuda/checkpoint_yield_check.cu 0 +19
New:
_qd_checkpoint_yield_check() 0 +16
python/quadrants/lang/ast/ast_transformer.py 1311 +18 -1
New:
ASTTransformer._build_checkpoint_with() 0 +7
ASTTransformer._is_checkpoint_call() 0 +3
Existing:
ASTTransformer.build_With() 14 +5 -1
<module>() 6 +3
quadrants/ir/frontend_ir.h 829 +14
New:
ASTBuilder::begin_checkpoint() 0 +5
ASTBuilder::end_checkpoint() 0 +4
Existing:
<module>() 19 +5
quadrants/runtime/amdgpu/kernel_launcher.h 54 +14
Existing:
<module>() 32 +14
quadrants/runtime/cpu/kernel_launcher.h 46 +13 -9
Existing:
<module>() 36 +13 -9
quadrants/codegen/spirv/checkpoint_yield_check_shader.h 0 +13
New:
<module>() 0 +13
python/quadrants/lang/kernel_impl.py 173 +12 -3
Existing:
kernel() 17 +9 -2
_kernel_impl() 11 +3
quadrants/runtime/cuda/graph_do_while_cond.cu 6 +11
New:
_qd_graph_do_while_cond_with_yield() 0 +11
python/quadrants/lang/graph_status.py 0 +10
New:
GraphStatus.__init__() 0 +1
# note: per-function +/- differs from file totals by added_drift=+9 removed_drift=+0
quadrants/runtime/gfx/kernel_launcher.cpp 73 +9
Existing:
KernelLauncher::launch_offloaded_tasks_with_do_while() 38 +9
quadrants/python/export_lang.cpp 1065 +8 -2
Existing:
export_lang() 1027 +8 -2
quadrants/runtime/cuda/checkpoint_gate.cu 0 +8
New:
_qd_checkpoint_if_gate() 0 +6
quadrants/ir/frontend_ir.cpp 1497 +7 -1
Existing:
ASTBuilder::insert() 3 +1 -1
ASTBuilder::begin_frontend_mesh_for() 17 +1
ASTBuilder::begin_frontend_range_for() 9 +1
ASTBuilder::begin_frontend_struct_for_on_external_tensor() 16 +1
ASTBuilder::begin_frontend_struct_for_on_snode() 15 +1
FrontendForStmt::FrontendForStmt() 18 +1
FrontendForStmt::init_config() 19 +1
python/quadrants/lang/_quadrants_callable.py 42 +7
New:
QuadrantsCallable.resume() 0 +5
BoundQuadrantsCallable.resume() 0 +2
quadrants/codegen/llvm/llvm_compiled_data.h 117 +6 -2
Existing:
OffloadedTask::OffloadedTask() 11 +4 -2
<module>() 5 +1
python/quadrants/lang/checkpoint.py 0 +6
New:
checkpoint() 0 +4
quadrants/ir/statements.h 1325 +6
Existing:
<module>() 32 +6
quadrants/program/kernel_launcher.h 23 +6
Existing:
<module>() 5 +6
quadrants/program/program.h 211 +6
Existing:
<module>() 5 +6
quadrants/runtime/cuda/kernel_launcher.h 53 +6
Existing:
<module>() 6 +6
quadrants/ir/ir.h 500 +5 -1
New:
GraphRegionTag::GraphRegionTag() 0 +3
Existing:
GraphRegionTag::operator==() 10 +1 -1
<module>() 3 +1
python/quadrants/lang/misc.py 403 +4
Existing:
<module>() 13 +4
quadrants/codegen/amdgpu/codegen_amdgpu.cpp 504 +4
Existing:
TaskCodeGenAMDGPU::visit() 65 +4
quadrants/codegen/cuda/codegen_cuda.cpp 674 +4
Existing:
TaskCodeGenCUDA::visit() 68 +4
quadrants/rhi/public_device.h 518 +4
Existing:
<module>() 9 +4
quadrants/codegen/spirv/spirv_codegen.cpp 2568 +3
Existing:
TaskCodegen::generate_range_for_kernel() 137 +1
TaskCodegen::generate_serial_kernel() 5 +1
TaskCodegen::generate_struct_for_kernel() 5 +1
quadrants/ir/statements.cpp 396 +3
Existing:
OffloadedStmt::clone() 55 +1
RangeForStmt::clone() 8 +1
StructForStmt::clone() 7 +1
quadrants/program/launch_context_builder.h 115 +3
Existing:
<module>() 17 +3
quadrants/runtime/gfx/kernel_launcher.h 20 +3
Existing:
<module>() 3 +3
quadrants/transforms/lower_ast.cpp 432 +3
Existing:
LowerAST::visit() 125 +3
quadrants/transforms/offload.cpp 626 +3
Existing:
Offloader::run() 107 +2
Offloader::emit_struct_for() 64 +1
python/quadrants/lang/__init__.py 51 +2
Existing:
<module>() 9 +2
quadrants/analysis/gen_offline_cache_key.cpp 569 +2
Existing:
ASTSerializer::emit() 10 +1
ASTSerializer::visit() 6 +1
quadrants/codegen/spirv/kernel_utils.h 221 +2
Existing:
<module>() 14 +2
quadrants/program/context.h 17 +2
Existing:
<module>() 3 +2
tests/python/test_api.py 505 +2
Existing:
<module>() 12 +2
scripts/build_condition_kernel_fatbin.py 63 +1 -1
Existing:
<module>() 4 +1 -1
quadrants/codegen/cpu/codegen_cpu.cpp 252 +1
Existing:
TaskCodeGenCPU::visit() 43 +1
quadrants/codegen/llvm/codegen_llvm.h 268 +1
Existing:
<module>() 3 +1
quadrants/rhi/metal/metal_device.h 427 +1
Existing:
<module>() 6 +1
quadrants/rhi/vulkan/vulkan_device.h 574 +1
Existing:
<module>() 6 +1
quadrants/codegen/llvm/codegen_llvm.cpp 2678 +0
Notes:
* The number columns (without a + or - sign) are code-line counts in the BASE (pre-PR) version: file size before this PR (0 for newly-added files), function body size before this PR (0 for new functions; original body size for deleted functions).
* +<n> / -<n> are code lines added / removed by this PR.
* Code lines exclude blank lines, comment-only lines, and Python multi-line strings.
Loading