diff --git a/Makefile b/Makefile index 2f119ff0..330501ff 100644 --- a/Makefile +++ b/Makefile @@ -382,6 +382,32 @@ test-gemm-selectors: $(GPU_PFGEMM_TEST) $(GPU_QGEMM_TEST) $(GPU_FP8GEMM_TEST) GPU_PFHOST_TEST = $(OUT_DIR)/gpu_pfhost_test $(GPU_PFHOST_TEST): tests/gpu_pfhost_test.c tests/bw_warp_sim_tc.h src/omega_gpu_pfhost.h src/omega_blackwell_codegen_pfhost.h $(OUT_DIR)/libomega_gpu.a $(CC) $(CFLAGS) -ffp-contract=off -DWS_MAX_THREADS=1024 -Itests -o $@ tests/gpu_pfhost_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm +# omega#456: the prefill tests above, host model and warp simulator only. Every run names --host-only or --sim, the two +# modes that never open the device (each test's main returns before its chip part); chip runs stay under the GB10 lock. +.PHONY: test-gpu-prefill-host +test-gpu-prefill-host: $(GPU_TC_PROBE_TEST) $(GPU_TCGEMM_TEST) $(GPU_PATTN_TEST) $(GPU_PF_MEM_TEST) $(GPU_PFGEMM_TEST) \ + $(GPU_QMMA_PROBE_TEST) $(GPU_QGEMM_TEST) $(GPU_PFHOST_TEST) + ./$(GPU_TC_PROBE_TEST) --host-only + ./$(GPU_QMMA_PROBE_TEST) --host-only + ./$(GPU_PF_MEM_TEST) --host-only + ./$(GPU_TCGEMM_TEST) --host-only + ./$(GPU_TCGEMM_TEST) --sim + ./$(GPU_PATTN_TEST) --host-only + ./$(GPU_PATTN_TEST) --sim + ./$(GPU_PFGEMM_TEST) --host-only + ./$(GPU_PFGEMM_TEST) --sim + ./$(GPU_QGEMM_TEST) --host-only + ./$(GPU_QGEMM_TEST) --sim + ./$(GPU_PFHOST_TEST) --host-only + ./$(GPU_PFHOST_TEST) --sim + @echo "test-gpu-prefill-host: PASS (8 prefill tests, host model + warp simulator, no device)" +# omega#456: tools/own30b_decode_profile.c is a link-only recorder built by hand on the Spark; compile it with the +# project's -Werror flags so a warning cannot land unseen. +.PHONY: check-own30b-decode-profile +check-own30b-decode-profile: tools/own30b_decode_profile.c + @mkdir -p $(OUT_DIR) + $(CC) $(CFLAGS) -c -o $(OUT_DIR)/own30b_decode_profile.o tools/own30b_decode_profile.c + @echo "check-own30b-decode-profile: PASS (compiles with -Werror)" # OWN-30B W-L2 (2026-10-13): command list (many launches, one submission) + decode glue kernels. test-gpu-cmdlist is # host-only + warp simulator; the chip gate is tools/run_gpu_cmdlist_chip.sh under the GB10 lock. .PHONY: test-gpu-cmdlist @@ -399,7 +425,7 @@ GPU_DECODE_GRAPH_TEST = $(OUT_DIR)/gpu_decode_graph_test GPU_DGRAPH_ABORT_TEST = $(OUT_DIR)/test_omega_gpu_decode_graph_abort $(GPU_DECODE_GRAPH_TEST): tests/gpu_decode_graph_test.c src/omega_gpu_decode_graph.h src/omega_gpu_cmdlist.h $(OUT_DIR)/libomega_gpu.a $(CC) $(CFLAGS) -ffp-contract=off -o $@ tests/gpu_decode_graph_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm -test-gpu-decode-graph: $(GPU_DECODE_GRAPH_TEST) $(GPU_DGRAPH_ABORT_TEST) test-gpu-decode-graph-abort-mutants +test-gpu-decode-graph: $(GPU_DECODE_GRAPH_TEST) $(GPU_DGRAPH_ABORT_TEST) test-gpu-decode-graph-abort-mutants test-gpu-decode-graph-timeline ./$(GPU_DECODE_GRAPH_TEST) --host-only ./$(GPU_DGRAPH_ABORT_TEST) @@ -430,6 +456,32 @@ test-gpu-decode-graph-abort-mutants: $(OUT_DIR)/libomega_gpu.a dmut abort-submits 's|^int omega_gpu_decode_graph_abort_token(OmegaGpuDecodeGraph \*g) {$$|&\n if (g \&\& g->in_token) return omega_gpu_decode_graph_end_token(g, NULL, NULL);|'; \ echo "test-gpu-decode-graph-abort-mutants: $$killed of 5 mutants killed" +# omega #456: the per-token timeline (set_stamps) never writes past stamp[]: 4096 stamped launches fill it, the 4097th +# (flush_each, one submission per launch) fails the token and leaves no timeline. Fake platform that completes every +# submission; no device. Each mutant breaks one rule in a copy of omega_gpu_decode_graph.c linked ahead of the library; +# the overflow case must FAIL on it. +.PHONY: test-gpu-decode-graph-timeline +GPU_DGRAPH_TL_TEST = $(OUT_DIR)/test_omega_gpu_decode_graph_timeline +GPU_DGRAPH_TL_MUT = $(OUT_DIR)/dgraph_tl_mut +$(GPU_DGRAPH_TL_TEST): tests/test_omega_gpu_decode_graph_timeline.c src/omega_gpu_decode_graph.h src/omega_gpu_platform.h $(OUT_DIR)/libomega_gpu.a + $(CC) $(CFLAGS) -o $@ tests/test_omega_gpu_decode_graph_timeline.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm +test-gpu-decode-graph-timeline: $(GPU_DGRAPH_TL_TEST) + ./$(GPU_DGRAPH_TL_TEST) + @mkdir -p $(GPU_DGRAPH_TL_MUT) + @set -e; \ + tmut() { name=$$1; script=$$2; \ + sed -e "$$script" src/omega_gpu_decode_graph.c > $(GPU_DGRAPH_TL_MUT)/$$name.c; \ + if cmp -s src/omega_gpu_decode_graph.c $(GPU_DGRAPH_TL_MUT)/$$name.c; then echo "mutant $$name: pattern not found"; exit 1; fi; \ + $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -o $(GPU_DGRAPH_TL_MUT)/$$name tests/test_omega_gpu_decode_graph_timeline.c \ + $(GPU_DGRAPH_TL_MUT)/$$name.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm; \ + if ./$(GPU_DGRAPH_TL_MUT)/$$name > $(GPU_DGRAPH_TL_MUT)/$$name.log 2>&1; then echo "mutant $$name SURVIVED"; exit 1; fi; \ + if ! grep -q '^FAIL one launch past the timeline' $(GPU_DGRAPH_TL_MUT)/$$name.log; then \ + echo "mutant $$name: no FAIL case (did not run?)"; cat $(GPU_DGRAPH_TL_MUT)/$$name.log; exit 1; fi; \ + echo "mutant $$name killed"; }; \ + tmut room-off-by-one 's|(uint32_t)(cnt - from) > room) {|(uint32_t)(cnt - from) > room + 1u) {|'; \ + tmut timeline-after-failure 's#if (!g->stamps || g->failed || #if (!g->stamps || #'; \ + echo "test-gpu-decode-graph-timeline: 2 of 2 mutants killed" + # OWN-30B W-L2c (2026-10-14): per-launch fixed cost inside a command list (tests/gpu_launch_cost_test.c, chip only, GB10 lock). GPU_LAUNCH_COST_TEST = $(OUT_DIR)/gpu_launch_cost_test $(GPU_LAUNCH_COST_TEST): tests/gpu_launch_cost_test.c src/omega_gpu_fp8_api.h src/omega_gpu_cmdlist.h $(OUT_DIR)/libomega_gpu.a diff --git a/om/moe/.crumb b/om/moe/.crumb index 3794ff0d..f3815351 100644 --- a/om/moe/.crumb +++ b/om/moe/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-28T17:07:44Z", + "compiled_at": "2026-10-31T02:10:04Z", "compiler": "crumb-compile/1", - "digest": "sha256:ffd66b6634b55e7e3d9780a321ad4c9bc4383b9c681f5a718479826cc0c71329", + "digest": "sha256:860df8a631262e15e20d1cb08f33090a8038ea5071a027ae157f53a93bb9f69f", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 17, - "generated_at_commit": "313fae26af8d0b9a26897a584efc3bfde358f7e6", - "source_tree": "sha256:0ec79f49af490b0b4d08109ab154971b22ee272e26c36543bf7fb296ad9db97b" + "generated_at_commit": "802b6c74f77c83b815367be09a4e707c48ed358a", + "source_tree": "sha256:a74e2ad255115f50654a809d5dc063d2fe61d39eb0f26e944b3ba0365e037814" } }, "name": "moe", diff --git a/src/omega_gpu_decode_graph.c b/src/omega_gpu_decode_graph.c index 9c126171..dba9984f 100644 --- a/src/omega_gpu_decode_graph.c +++ b/src/omega_gpu_decode_graph.c @@ -227,7 +227,16 @@ static int submit_now(OmegaGpuDecodeGraph *g) { uint64_t tmp[OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 1]; int cnt = omega_gpu_cmdlist_stamps(g->cl, tmp, OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 1); if (cnt < 0) rc = -1; - else { const int from = g->n_stamp == 0 ? 0 : 1; for (int i = from; i < cnt; i++) g->stamp[g->n_stamp++] = tmp[i]; } + else { + const int from = g->n_stamp == 0 ? 0 : 1; + const uint32_t room = (uint32_t)(sizeof g->stamp / sizeof g->stamp[0]) - g->n_stamp; + if (cnt > from && (uint32_t)(cnt - from) > room) { /* more launches this token than the timeline holds */ + omega_gpu_session_set_error("decode graph: timeline full (more launches per token than OMEGA_GPU_CMDLIST_MAX_LAUNCHES)"); + rc = -1; + } else { + for (int i = from; i < cnt; i++) g->stamp[g->n_stamp++] = tmp[i]; + } + } } g->tagged_in_list = 0; omega_gpu_cmdlist_reset(g->cl); @@ -417,7 +426,7 @@ void omega_gpu_decode_graph_set_stamps(OmegaGpuDecodeGraph *g, int on) { if (g & int omega_gpu_decode_graph_stamps(const OmegaGpuDecodeGraph *g, uint64_t *stamps, uint8_t *kinds, uint32_t cap) { if (!g || g->in_token || !stamps || !kinds) return OMEGA_GPU_DGRAPH_BAD_ARGS; - if (!g->stamps || g->n_stamp != g->n_kind + 1u) { omega_gpu_session_set_error("decode graph: no timeline for the last token (stamps off or it failed)"); return OMEGA_GPU_DGRAPH_BAD_ARGS; } + if (!g->stamps || g->failed || g->n_stamp != g->n_kind + 1u) { omega_gpu_session_set_error("decode graph: no timeline for the last token (stamps off or it failed)"); return OMEGA_GPU_DGRAPH_BAD_ARGS; } if (cap < g->n_stamp) { omega_gpu_session_set_error("decode graph: timeline buffers too small"); return OMEGA_GPU_DGRAPH_BAD_ARGS; } memcpy(stamps, g->stamp, (size_t)g->n_stamp * sizeof stamps[0]); memcpy(kinds, g->kind, (size_t)g->n_kind); diff --git a/src/omega_gpu_fp8_api.c b/src/omega_gpu_fp8_api.c index f5e46d04..5e502950 100644 --- a/src/omega_gpu_fp8_api.c +++ b/src/omega_gpu_fp8_api.c @@ -110,7 +110,7 @@ void omega_gpu_fp8_set_depth(int set, uint32_t depth) { omega_gpu_session_lock() void omega_gpu_fp8_set_gpr_pad(uint32_t pad) { omega_gpu_session_lock(); g.gpr_pad = pad; omega_gpu_session_unlock(); } void omega_gpu_fp8_set_cta_budget(uint32_t ctas) { omega_gpu_session_lock(); g.cta_budget_set = ctas != 0; g.cta_budget = ctas ? ctas : OMEGA_GPU_FP8_MAX_CTAS; cache_clear_locked(); omega_gpu_session_unlock(); } void omega_gpu_fp8_test_set_mutant(int m) { omega_gpu_session_lock(); g.mutant = m; cache_clear_locked(); omega_gpu_session_unlock(); } -void omega_gpu_fp8_test_set_no_fold(int on) { g.no_fold = on ? 1 : 0; } +void omega_gpu_fp8_test_set_no_fold(int on) { omega_gpu_session_lock(); g.no_fold = on ? 1 : 0; omega_gpu_session_unlock(); } void omega_gpu_fp8_seal(int on) { omega_gpu_session_lock(); g.sealed = on ? 1 : 0; omega_gpu_session_unlock(); } /* ---- GEMV variant (W-L2c): 1 = omega_blackwell_codegen_moe.c (default), 2 = omega_blackwell_codegen_moe2.c (row-pipelined) ---- */ @@ -456,6 +456,9 @@ int omega_gpu_fp8_tensor_upload(uint32_t experts, uint32_t n, uint32_t k, const t->owner_generation = next_owner; t->allocation_epoch = omega_gpu_session_epoch(); } + /* Fill and sync under the lock (omega#456): t is not shared yet, but its CPU views belong to the open device, and a + * device close on another thread between unlock and memcpy would unmap them; sync_to_gpu also reads the open state. + * g.no_fold is read under the lock, as its setter now writes it. The cost is holding the lock for one weight copy. */ if (rc == OMEGA_GPU_FP8_OK) { memcpy(t->w.cpu, w, wbytes); if (omega_fp8_pack_scales(scale, scount, t->s.cpu, g.no_fold) != 0) { omega_gpu_session_set_error("fp8 upload: NaN, inf or overflowing scale"); rc = OMEGA_GPU_FP8_BAD_ARGS; } diff --git a/tests/gpu_fp8gemm_test.c b/tests/gpu_fp8gemm_test.c index cf603a5d..988d8a24 100644 --- a/tests/gpu_fp8gemm_test.c +++ b/tests/gpu_fp8gemm_test.c @@ -49,7 +49,10 @@ static void weights_free(Weights *W) { free(W->w); free(W->s); } * bytes (word, byte), acc = fma(dot, S', acc), then the SHFL.DOWN tree 16..1. w: the row's k bytes, s: its k/128 scale words * (bf16 bits of one 128-row block), x: natural-order activation row. */ static float emu_row(const uint8_t *w, const uint16_t *s, const float *x, uint32_t k, uint32_t lb) { - float xp[16384]; omega_fp8_pack_x_f32(x, k, xp); + /* static, not 64 KB of stack (omega#456); this test runs one thread. k is bounded by OMEGA_FP8_MAX_K (16384). */ + static float xp[16384]; + if (k > sizeof xp / sizeof xp[0]) { fprintf(stderr, "emu_row: k=%u exceeds %zu\n", k, sizeof xp / sizeof xp[0]); exit(2); } + omega_fp8_pack_x_f32(x, k, xp); float a[32]; const uint32_t steps = k / (32u * lb); for (unsigned lane = 0; lane < 32; lane++) { float acc = 0.0f; diff --git a/tests/test_omega_gpu_decode_graph_timeline.c b/tests/test_omega_gpu_decode_graph_timeline.c new file mode 100644 index 00000000..610976c9 --- /dev/null +++ b/tests/test_omega_gpu_decode_graph_timeline.c @@ -0,0 +1,303 @@ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* test_omega_gpu_decode_graph_timeline: the decode graph's per-token timeline never writes past stamp[] (omega #456). + * Host program on a FAKE OmegaGpuPlatform that completes every submission (markers, launch semaphores, stamp reports); + * links libomega_gpu.a with the fake installed first; opens no device, touches no GPU. + * + * The timeline holds OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 1 stamps. Batched, a token's list never holds more launches than + * that. With flush_each (one submission per launch) the list is emptied after every launch, so nothing in the command + * list bounds the number of launches a token records: before #456 the 4097th stamped launch wrote stamp[4097], past the + * end of the graph. Contract under test: 4096 launches fill the timeline exactly (stamps() returns 4096); one more fails + * the token (CHIP_FAIL, timeline refused, lock released) and the next token runs normally. + * + * Each case runs in its own child process. + */ +#include "omega_gpu_decode_graph.h" +#include "omega_gpu_session.h" +#include "omega_gpu_platform.h" +#include "omega_gpu_cmdlist.h" +#include "omega_blackwell_submit.h" + +#include +#include +#include +#include +#include + +static int case_ok; +#define EXPECT(c) do { if (!(c)) { case_ok = 0; printf(" expect failed at line %d: %s\n", __LINE__, #c); } } while (0) + +/* ---- the fake platform: every submitted word stream "runs" ---- */ +#define NB OMEGA_GPU_HANDLE_SLOTS +#define VA_BASE 0x100000000ull +#define VA_STRIDE 0x1000000ull +static struct { + OmegaGpuHandleTable t; + void *mem[NB]; + OmegaGpuBufferDesc desc[NB]; + OmegaGpuDeviceHandle dev; + OmegaGpuQueueHandle q; + OmegaGpuBufferHandle ring; + uint64_t ns; + unsigned locks_held, double_locks, bad_unlocks, submits; + uint64_t dev_token_va; /* nonzero: the device wrote dev_token there (seen at the gpu->cpu sync) */ + uint32_t dev_token; +} fk; + +static uint64_t f_now_ns(void *c) { (void)c; fk.ns += 1000u; return fk.ns; } +static uint64_t f_now_ms(void *c) { return f_now_ns(c) / 1000000u; } +static int f_wait(void *c, uint64_t ms) { (void)c; fk.ns += ms * 1000000u; return 0; } +static int f_lock(void *c, uint32_t id) { + (void)c; + if (id != OMEGA_GPU_SESSION_LOCK_ID) return OMEGA_GPU_PLAT_REFUSED_ARGS; + if (fk.locks_held) { fk.double_locks++; return OMEGA_GPU_PLAT_REFUSED_BUSY; } /* a real lock would block forever */ + fk.locks_held = 1; + return 0; +} +static int f_unlock(void *c, uint32_t id) { + (void)c; + if (id != OMEGA_GPU_SESSION_LOCK_ID || !fk.locks_held) { fk.bad_unlocks++; return OMEGA_GPU_PLAT_REFUSED_ARGS; } + fk.locks_held = 0; + return 0; +} +static const char *f_diag(void *c) { (void)c; return ""; } +static int f_dev_open(void *c, uint32_t ord, OmegaGpuDeviceHandle *out) { + (void)c; + if (ord != 0 || fk.dev.generation) return OMEGA_GPU_PLAT_REFUSED_LIMIT; + int rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_DEVICE, 0, 1, 0, &out->index, &out->generation); + if (rc == 0) fk.dev = *out; + return rc; +} +static int f_dev_close(void *c, OmegaGpuDeviceHandle d) { + (void)c; + int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE); + if (rc) return rc; + (void)omega_gpu_handles_close(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE); + memset(&fk.dev, 0, sizeof fk.dev); + return 0; +} +static OmegaGpuPlatformCaps g_caps = { + .abi_major = OMEGA_GPU_PLATFORM_ABI_MAJOR, .abi_minor = OMEGA_GPU_PLATFORM_ABI_MINOR, + .services = OMEGA_GPU_SVC_REQUIRED_SESSION, .max_devices = 1, .max_buffers = 1000, .max_queues = 1, .max_inflight = 1, + .max_buffer_bytes = 1ull << 30, .max_total_bytes = 1ull << 32, +}; +static int f_alloc(void *c, OmegaGpuDeviceHandle d, const OmegaGpuBufferDesc *desc, OmegaGpuBufferHandle *o, + OmegaCpuView *cpu, OmegaGpuVa *g, OmegaGpuBusAddr *b) { + (void)c; + int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE); + if (!rc) rc = omega_gpu_platform_check_buffer(desc, &g_caps); + if (!rc) rc = omega_gpu_handles_open(&fk.t, desc->kind, desc->bytes, 1000, 1ull << 32, &o->index, &o->generation); + if (rc) return rc; + void *m = calloc(1, desc->bytes); + if (!m) { (void)omega_gpu_handles_close(&fk.t, o->index, o->generation, desc->kind); return OMEGA_GPU_PLAT_REFUSED_LIMIT; } + fk.mem[o->index] = m; fk.desc[o->index] = *desc; + cpu->ptr = m; cpu->len = desc->bytes; g->va = VA_BASE + (uint64_t)o->index * VA_STRIDE; b->iova = 0; + return 0; +} +static int f_free(void *c, OmegaGpuBufferHandle h) { + (void)c; + if (h.index >= NB) return OMEGA_GPU_PLAT_REFUSED_BAD_HANDLE; + int rc = omega_gpu_handles_close(&fk.t, h.index, h.generation, fk.t.kind[h.index]); + if (rc) return rc; + free(fk.mem[h.index]); fk.mem[h.index] = NULL; + return 0; +} +static int buf_live(OmegaGpuBufferHandle h) { return h.index < NB && fk.t.live[h.index] && fk.t.generation[h.index] == h.generation; } +static void *va_to_cpu(uint64_t va) { + for (uint32_t i = 0; i < NB; i++) { + if (!fk.mem[i] || !fk.t.live[i]) continue; + const uint64_t base = VA_BASE + (uint64_t)i * VA_STRIDE; + if (va >= base && va < base + fk.desc[i].bytes) return (uint8_t *)fk.mem[i] + (va - base); + } + return NULL; +} +static int sync_check(OmegaGpuBufferHandle h, uint64_t off, uint64_t len) { + if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE; + if (len == 0 || off > fk.desc[h.index].bytes || len > fk.desc[h.index].bytes - off) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH; + return 0; +} +static int f_c2g(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) { (void)c; return sync_check(h, off, len); } +/* gpu->cpu: a command list's launch semaphores (16-byte slots, every one still INIT) read DONE: the launches ran. + * Only a range whose every 16-byte slot holds INIT is taken for a semaphore array. */ +static int f_g2c(void *c, OmegaGpuBufferHandle h, uint64_t off, uint64_t len) { + (void)c; + int rc = sync_check(h, off, len); + if (rc) return rc; + if (len % 16u == 0) { + uint32_t *w = (uint32_t *)((uint8_t *)fk.mem[h.index] + off); + uint64_t i = 0, n = len / 16u; + while (i < n && w[4 * i] == OMEGA_BW_SEMAPHORE_INTERMEDIATE_INIT) i++; + if (i == n) for (i = 0; i < n; i++) w[4 * i] = OMEGA_BW_SEMAPHORE_INTERMEDIATE_DONE; + } + if (fk.dev_token_va) { uint32_t *t = va_to_cpu(fk.dev_token_va); if (t) t[0] = fk.dev_token; } + return 0; +} +static int f_poll(void *c, OmegaGpuBufferHandle h, uint64_t off, uint32_t want, uint64_t ms, uint32_t *seen) { + (void)c; + if (!buf_live(h)) return OMEGA_GPU_PLAT_REFUSED_STALE_HANDLE; + if (!(fk.desc[h.index].rights & OMEGA_GPU_RIGHT_HOST_POLLED)) return OMEGA_GPU_PLAT_REFUSED_BAD_RIGHTS; + const volatile uint32_t *w = (const volatile uint32_t *)((uint8_t *)fk.mem[h.index] + off); + *seen = *w; + if ((int32_t)(*w - want) >= 0) return 0; + fk.ns += ms * 1000000u; + return OMEGA_GPU_POLL_TIMED_OUT; +} +static int f_qopen(void *c, OmegaGpuDeviceHandle d, OmegaGpuBufferHandle ring, OmegaGpuQueueHandle *o) { + (void)c; + int rc = omega_gpu_handles_check(&fk.t, d.index, d.generation, OMEGA_GPU_HANDLE_DEVICE); + if (!rc && (!buf_live(ring) || fk.t.kind[ring.index] != OMEGA_GPU_HANDLE_BUF_QUEUE)) rc = OMEGA_GPU_PLAT_REFUSED_BAD_KIND; + if (!rc) rc = omega_gpu_handles_open(&fk.t, OMEGA_GPU_HANDLE_QUEUE, 0, 1, 0, &o->index, &o->generation); + if (!rc) { fk.q = *o; fk.ring = ring; } + return rc; +} +static int f_qclose(void *c, OmegaGpuQueueHandle q) { + (void)c; + int rc = omega_gpu_handles_close(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE); + if (!rc) memset(&fk.q, 0, sizeof fk.q); + return rc; +} +static uint32_t mthd(uint32_t subc, uint32_t m, uint32_t count) { return (2u << 28) | (count << 16) | (subc << 13) | (m >> 2); } +/* The fake device runs the stream: semaphore releases (0x005c: the completion markers) write their payload, compute + * report semaphores (0x0158, four-word: the stamps) write {payload, timestamp}. */ +static int f_submit(void *c, OmegaGpuQueueHandle q, const uint32_t *w, uint32_t n) { + (void)c; + int rc = omega_gpu_handles_check(&fk.t, q.index, q.generation, OMEGA_GPU_HANDLE_QUEUE); + if (rc) return rc; + if ((uint64_t)n * 4u > fk.desc[fk.ring.index].bytes) return OMEGA_GPU_PLAT_REFUSED_BAD_LENGTH; + fk.submits++; + for (uint32_t i = 0; i + 5 < n; i++) { + if (w[i] == mthd(0, 0x005c, 5)) { + uint32_t *m = va_to_cpu((uint64_t)w[i + 1] | ((uint64_t)w[i + 2] << 32)); + if (m) *m = w[i + 3]; + i += 5; + } else if (w[i] == mthd(1, 0x0158, 5)) { + uint64_t *s = va_to_cpu((uint64_t)w[i + 3] | ((uint64_t)w[i + 4] << 32)); + if (s) { s[0] = (uint64_t)w[i + 1] | ((uint64_t)w[i + 2] << 32); s[1] = (fk.ns += 1000u); } + i += 5; + } + } + return 0; +} +static int f_retire(void *c, OmegaGpuQueueHandle q) { (void)c; (void)q; return 0; } +static void *f_halloc(void *c, size_t b) { (void)c; return malloc(b); } +static void f_hfree(void *c, void *p) { (void)c; free(p); } + +static OmegaGpuPlatform g_plat = { + .ctx = &fk, .time_now_ms = f_now_ms, .wait_ms = f_wait, .lock = f_lock, .unlock = f_unlock, + .dma_alloc = f_alloc, .dma_free = f_free, .sync_cpu_to_gpu = f_c2g, .sync_gpu_to_cpu = f_g2c, .poll_word = f_poll, + .device_open = f_dev_open, .device_close = f_dev_close, .diag_text = f_diag, + .queue_open = f_qopen, .queue_close = f_qclose, .queue_submit = f_submit, .queue_retire = f_retire, + .time_now_ns = f_now_ns, .host_alloc = f_halloc, .host_free = f_hfree, +}; + +/* ---- a one-layer graph on the fake ---- */ +#define LAYERS 1u +#define VOCAB 256u +#define MAX_POS 256u +typedef struct { + OmegaGpuDecodeAttnCache *attn; + OmegaGpuRouter *router; + OmegaGpuBf16Tensor *lm; + OmegaGpuDecodeGraph *g; +} World; + +static int world_build(World *w) { + memset(w, 0, sizeof *w); + static uint16_t lm_w[VOCAB * OMEGA_GPU_DGRAPH_HIDDEN]; /* zeros: finite bf16 */ + if (omega_gpu_decode_attn_cache_alloc(LAYERS, MAX_POS, 1e6, &w->attn) != 0) return -1; + if (omega_gpu_router_alloc(LAYERS, &w->router) != 0) return -1; + if (omega_gpu_bf16_tensor_upload(VOCAB, OMEGA_GPU_DGRAPH_HIDDEN, lm_w, &w->lm) != 0) return -1; + OmegaGpuDecodeGraphConfig cfg; memset(&cfg, 0, sizeof cfg); + cfg.layers = LAYERS; cfg.vocab = VOCAB; cfg.eps = 1e-6f; cfg.norm_topk = 1; + cfg.router = w->router; cfg.attn = w->attn; cfg.lm_head = w->lm; + if (omega_gpu_decode_graph_create(&cfg, &w->g) != OMEGA_GPU_DGRAPH_OK) return -1; + omega_gpu_decode_graph_set_stamps(w->g, 1); + omega_gpu_decode_graph_set_flush_each(w->g, 1); /* one submission per launch: the list never bounds the token */ + return 0; +} + +static float g_x[OMEGA_GPU_DGRAPH_HIDDEN]; +#define EXPECT_LOCK_FREE() do { EXPECT(fk.locks_held == 0); EXPECT(fk.double_locks == 0); EXPECT(fk.bad_unlocks == 0); } while (0) + +static int install(void) { + memset(&fk, 0, sizeof fk); omega_gpu_handles_init(&fk.t); + for (unsigned i = 0; i < OMEGA_GPU_DGRAPH_HIDDEN; i++) g_x[i] = (float)(i % 7) - 3.0f; + return omega_gpu_session_set_platform(&g_plat, &g_caps); +} + +/* One token of `launches` SWIGLU glue launches (each submitted on its own); returns end_token's code, fills *refused + * with the first record that did not return OK (launches when every record did). */ +static int token_of(World *w, uint32_t launches, uint32_t want, uint32_t *refused, uint32_t *tok) { + OmegaGpuDecodeGraphVas v; omega_gpu_decode_graph_vas(w->g, &v); + fk.dev_token_va = v.token; fk.dev_token = want; + *refused = launches; + if (omega_gpu_decode_graph_begin_token(w->g, g_x) != OMEGA_GPU_DGRAPH_OK) return -1000; + for (uint32_t i = 0; i < launches; i++) + if (omega_gpu_decode_graph_record_swiglu(w->g, v.gu, v.act, 1.0f) != OMEGA_GPU_DGRAPH_OK && *refused == launches) *refused = i; + const int rc = omega_gpu_decode_graph_end_token(w->g, tok, NULL); + fk.dev_token_va = 0; + return rc; +} + +static uint64_t g_st[OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 2]; +static uint8_t g_kd[OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 2]; + +/* MAX_LAUNCHES stamped launches: the timeline is exactly full and reads back whole. */ +static void c_full(void) { + World w; + if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } /* never fall back to the real driver */ + if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; } + uint32_t refused = 0, tok = 0; + EXPECT(token_of(&w, OMEGA_GPU_CMDLIST_MAX_LAUNCHES, 7, &refused, &tok) == OMEGA_GPU_DGRAPH_OK); + EXPECT(refused == OMEGA_GPU_CMDLIST_MAX_LAUNCHES && tok == 7); + EXPECT(fk.submits == OMEGA_GPU_CMDLIST_MAX_LAUNCHES); + EXPECT_LOCK_FREE(); + EXPECT(omega_gpu_decode_graph_stamps(w.g, g_st, g_kd, OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 2) == (int)OMEGA_GPU_CMDLIST_MAX_LAUNCHES); + for (uint32_t i = 0; i < OMEGA_GPU_CMDLIST_MAX_LAUNCHES; i++) if (!(g_st[i + 1] > g_st[i])) { EXPECT(!"stamps increase"); break; } +} + +/* One launch more than the timeline holds: that record fails the token, nothing is written past stamp[], the lock is + * released at end_token, no timeline is offered, and the next (small) token runs and reads back normally. */ +static void c_overflow(void) { + World w; + if (install() != OMEGA_GPU_PLAT_OK) { EXPECT(!"fake platform installs"); return; } + if (world_build(&w) != 0) { EXPECT(!"world builds on the fake"); return; } + uint32_t refused = 0, tok = 0xdeadu; + EXPECT(token_of(&w, OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 1u, 7, &refused, &tok) == OMEGA_GPU_DGRAPH_CHIP_FAIL); + EXPECT(refused == OMEGA_GPU_CMDLIST_MAX_LAUNCHES); /* the 4097th launch, the first that has no stamp slot */ + EXPECT(tok == 0xdeadu); + EXPECT(strstr(omega_gpu_session_last_error(), "timeline full") != NULL); + EXPECT_LOCK_FREE(); + EXPECT(omega_gpu_decode_graph_stamps(w.g, g_st, g_kd, OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 2) == OMEGA_GPU_DGRAPH_BAD_ARGS); + EXPECT(token_of(&w, 3, 9, &refused, &tok) == OMEGA_GPU_DGRAPH_OK); + EXPECT(refused == 3 && tok == 9); + EXPECT_LOCK_FREE(); + EXPECT(omega_gpu_decode_graph_stamps(w.g, g_st, g_kd, OMEGA_GPU_CMDLIST_MAX_LAUNCHES + 2) == 3); +} + +static const struct { const char *name; void (*fn)(void); } CASES[] = { + { "timeline exactly full: 4096 stamped launches read back", c_full }, + { "one launch past the timeline: token fails, no write past stamp[]", c_overflow }, +}; + +int main(int argc, char **argv) { + const unsigned n = sizeof CASES / sizeof CASES[0]; + if (argc == 2) { /* one case in this process (debugging): its index */ + const unsigned i = (unsigned)atoi(argv[1]); + if (i >= n) return 2; + case_ok = 1; CASES[i].fn(); + printf("%s %s\n", case_ok ? "ok " : "FAIL", CASES[i].name); + return case_ok ? 0 : 1; + } + unsigned failed = 0; + for (unsigned i = 0; i < n; i++) { + fflush(stdout); + pid_t pid = fork(); + if (pid == 0) { case_ok = 1; CASES[i].fn(); fflush(stdout); _exit(case_ok ? 0 : 1); } + int status = 0; + int ok = pid > 0 && waitpid(pid, &status, 0) == pid && WIFEXITED(status) && WEXITSTATUS(status) == 0; + printf("%s %s\n", ok ? "ok " : "FAIL", CASES[i].name); + if (!ok) failed++; + } + printf("test_omega_gpu_decode_graph_timeline: %u of %u cases passed: %s\n", n - failed, n, failed ? "FAIL" : "PASS"); + return failed ? 1 : 0; +} diff --git a/tools/extract/.crumb b/tools/extract/.crumb index 4024be03..c2e3f388 100644 --- a/tools/extract/.crumb +++ b/tools/extract/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-10-29T02:13:05Z", + "compiled_at": "2026-10-31T02:18:53Z", "compiler": "crumb-compile/1", - "digest": "sha256:d0c7122592333dfe6ea9a77efb7fa1722f69525ce0b4c1ef1fb774dd9c4da4dc", + "digest": "sha256:a35550169b7ad8d28e821d6e5354a9a3ced03dcf9556dbf5c96dd08310c4944a", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 30, - "generated_at_commit": "c67fc2772186b35b562d5067449fb3dc8997bc57", - "source_tree": "sha256:6e807561b32f039d7bc048885a7f8ce3a9e96f42945f35deee971c1eb2407d24" + "generated_at_commit": "02538d3bd12a14fce0c5875ac491203919e505ef", + "source_tree": "sha256:396ddda55052497750b75bebda7820fb6f86c309fb153a738b2744c65b74a94b" } }, "name": "extract", diff --git a/tools/extract/drift-baseline.tsv b/tools/extract/drift-baseline.tsv index d3a7f0d7..fa503c5b 100644 --- a/tools/extract/drift-baseline.tsv +++ b/tools/extract/drift-baseline.tsv @@ -6,7 +6,10 @@ # src/omega_blackwell_codegen.c (cudapp_om_units.c / cudapp_native.h names only); mk/runtime-r1.mk, mk/runtime-r3.mk, docs/runtime/API.md, omega_runtime_api.manifest, src/omega_runtime_api.h (CUDA++ runtime API 0.6.0 supersedes the omega #955 backport); # docs/runtime/PORTABILITY.md, portability_table.tsv (#954 rows and reclassifications carried; CUDA++ rows and its sha256 build differ); tests/dagsim/mutant_{lifetime,predict}.sh (link src/sha256.c); # the merged src/ and tests/ files keep the CUDA++ licence header and CUDA++-ahead code with the omega change applied. -Makefile 5527cafecd0cee9f87a7907b9065b8a8479ba057 +# Blobs omega changed through 4376c2112d7469b6908c6403720c9001de4622b5 (train r3 #979, omega#456 OWN-30B follow-ups) are that commit's (CUDApp sync/drift-omega-4376c21). +# Still differ at 4376c21 on purpose: Makefile (CUDA++ build); src/omega_gpu_fp8_api.c (CUDA++ owner-generation upload kept, omega#456 lock-held fill already there); +# tests/gpu_fp8gemm_test.c (CUDA++ test_out_open 0600 receipt kept over omega's 0644 open); licence headers. +Makefile b6ceafb7625f3a974efce405e2bd79393045f8f8 evidence/C3-GEMM/01-host-only.log c581c5126718bc24ef10ed1b1637528018a260e5 evidence/C3-GEMM/02-sim.log fd97da9f29871abfc16fb2ed938c38a4d3c2314f evidence/C3-GEMM/README.md 0e730a9bf2072f34d59d9cdc1961f4112a7ff90e @@ -222,7 +225,7 @@ src/omega_gpu_decode_attn256_api.c 77fc4ba1fd9df0939a57df3aa669e18fd9be2785 src/omega_gpu_decode_attn256_api.h d0212c2cbac34dcd69b8e50b298a94c715039a7f src/omega_gpu_decode_attn_api.c ac6542487249e5571684e00dc115d4e00c1462a1 src/omega_gpu_decode_attn_api.h c3e88b2eb4b94a9abaad04770cad4a93ff8cca1e -src/omega_gpu_decode_graph.c 43717c2a400b1517a0db3d21c90b2700bc873b1c +src/omega_gpu_decode_graph.c 211a08ec35f70025287683d8c565b77c791e6114 src/omega_gpu_decode_graph.h bb8a78b320d677cce2905b1f75868993caf022da src/omega_gpu_elementwise_api.c 7871035b91175ed90cb2c384c9c757236a41ff5a src/omega_gpu_elementwise_api.h 243b1ed9ca99c563fa2ad5c7fe95be01d63f1f58 @@ -230,7 +233,7 @@ src/omega_gpu_engine.c 9965ca19a345fa8fc441102146bf99d0706dc045 src/omega_gpu_engine.h 3733d534aaab756e0bfaff361021fe695d248f20 src/omega_gpu_fmt.c 270f3fe3e6d9715650867cbb04afdde88c63adec src/omega_gpu_fmt.h 8a308f4b22f43c340c03ffe7acff43319c58fed2 -src/omega_gpu_fp8_api.c c1dcc83246942c6e5f2f986d6c4d5f14a58557ac +src/omega_gpu_fp8_api.c b9b9b52960daa4bb95d25900353774ec5b9d19a9 src/omega_gpu_fp8_api.h 9c7caf2d269947e80554d029a1ed01a6c04f279b src/omega_gpu_fp8_pack.c 77bd62063fb3b6641221466e813760282cb3b81c src/omega_gpu_fp8gemm_api.c 5605a6ea823d9b41db741f249523cf38e75818ff @@ -321,7 +324,7 @@ tests/gpu_decode_graph_test.c 8af07f1e423f3db54438749eb4a76a1c9f09443c tests/gpu_elementwise_test.c 7a270eb5f45e96aa89d2e6fed6963b2ee044d05b tests/gpu_exact_head_test.c 5258f3d84f5bc44eca597666f146bb2cc54bcdf0 tests/gpu_fp8_api_test.c 8fcf839dce9575af4b0abde499eb809e64ad36f7 -tests/gpu_fp8gemm_test.c 1a9669f47793fe77f75da31aff8321834a439199 +tests/gpu_fp8gemm_test.c d44d35a68da5358868820aed5f5ab423d513d112 tests/gpu_gdn_multi_test.c 108578a8fc7dbb8b95db323e5ea1752da767601b tests/gpu_gdn_test.c 655875a653860259e3d93f80fb54bded048b26af tests/gpu_gemm_test.c b60f70964f40113d59931993e1c9eaa046008cfa @@ -386,3 +389,4 @@ mk/runtime-r3.mk 9c541fbb2574df1e91d291dd7b365cfce9fd471b src/omega_runtime_api.h 89e2acbee00c0fee71c0fa78913726ccc8e2f708 tests/dagsim/mutant_lifetime.sh b3641225446bc7750b9f49d2e62050a7fadf316a tests/dagsim/mutant_predict.sh 89df5266df444b0a91d4d4c6f120d69ad52c61ef +tests/test_omega_gpu_decode_graph_timeline.c 619eac986fb47f17e76d8e5c9bad137237146d6d diff --git a/tools/own30b_decode_profile.c b/tools/own30b_decode_profile.c new file mode 100644 index 00000000..1ec75d6c --- /dev/null +++ b/tools/own30b_decode_profile.c @@ -0,0 +1,133 @@ +/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ +/* Link-only recorder for OWN-30B decode. No production launcher changes. + * Link with -Wl,--wrap=omega_gpu_session_launch and this object. + * Measures HOST times: elapsed_ns is submit-to-second-marker, NOT GPU cycles. + * Only complete sequences of 48 x (qkv, attention, o, router, gu, down) + head + * following a head are retained. Prefill, controls and partial steps are rejected. + * No allocation or I/O in the measured path. Dump raw integer totals at exit. + */ +#include "omega_gpu_session.h" +#include "omega_blackwell_codegen_moe.h" +#include "omega_blackwell_codegen_attn.h" +#include "omega_blackwell_codegen_router.h" +#include "omega_blackwell_codegen_bf16.h" +#include +#include +#include + +enum { QKV, ATTN, O, ROUTER, GU, DOWN, HEAD, OTHER, STAGES = OTHER }; +static const char *names[STAGES] = { "qkv", "attention", "o", "router", "gate_up", "down", "lm_head" }; +typedef struct { uint64_t calls, bytes, session_ns, submit_wait_ns, gap_before_ns; } Row; +typedef struct { Row stage[STAGES]; uint64_t end_ns, start_ns; uint32_t pos; } Token; +static Token pending, tokens[4096]; +static size_t used, dropped; +static int armed, invalid; +static uint64_t last_end; + +static int classify(const OmegaGpuLaunch *l, uint64_t *bytes) { + *bytes = 0; + if (!l || !l->args) return OTHER; + if (l->n_args == OMEGA_FP8_ARGS_WORDS) { + uint32_t n = l->args[8] / 4u, g = l->grid_y, k; + int s; + if (g == 1 && n == 5120) { s = QKV; k = 2048; } + else if (g == 1 && n == 2048) { s = O; k = 4096; } + else if (g == 8 && n == 1536) { s = GU; k = 2048; } + else if (g == 8 && n == 2048) { s = DOWN; k = 768; } + else return OTHER; + *bytes = (uint64_t)g * n * k; + return s; + } + if (l->n_args == OMEGA_DATTN_ARGS_WORDS && l->num_elements == 4096) { + *bytes = 2ull * 4 * ((uint64_t)l->args[18] + 1) * 256; + return ATTN; + } + if (l->n_args == OMEGA_ROUTER_ARGS_WORDS && l->num_elements == 2048) { + *bytes = 128ull * 2048 * 2; + return ROUTER; + } + if (l->n_args == OMEGA_BF16_ARGS_WORDS && l->num_elements == 151936) { + *bytes = 151936ull * 2048 * 2; + return HEAD; + } + return OTHER; +} + +static void record(int s, uint64_t bytes, uint64_t begin, uint64_t end, uint64_t elapsed, int rc) { + if (armed) { + int expected = pending.pos < 288 ? (int)(pending.pos % 6) : HEAD; + if (rc || s != expected || pending.pos > 288) invalid = 1; + if (!invalid) { + Row *r = &pending.stage[s]; + r->calls++; + r->bytes += bytes; + r->session_ns += end - begin; + r->submit_wait_ns += elapsed; + r->gap_before_ns += begin - last_end; + pending.pos++; + } + } + if (s == HEAD) { + if (armed && !invalid && pending.pos == 289) { + pending.end_ns = end; + if (used < sizeof tokens / sizeof tokens[0]) tokens[used++] = pending; + else dropped++; + } + memset(&pending, 0, sizeof pending); + pending.start_ns = end; + armed = !rc; + invalid = 0; + } + last_end = end; +} + +#ifndef OWN30B_PROFILE_TEST +int __real_omega_gpu_session_launch(const OmegaGpuLaunch *, uint64_t *, uint32_t *); +int __wrap_omega_gpu_session_launch(const OmegaGpuLaunch *l, uint64_t *elapsed, uint32_t *marker) { + uint64_t bytes, local_elapsed = 0; + int s = classify(l, &bytes); + uint64_t begin = omega_gpu_session_now_ns(); + int rc = __real_omega_gpu_session_launch(l, &local_elapsed, marker); + uint64_t end = omega_gpu_session_now_ns(); + if (elapsed) *elapsed = local_elapsed; + record(s, bytes, begin, end, local_elapsed, rc); + return rc; +} + +__attribute__((destructor)) static void dump(void) { + fprintf(stderr, "DECODE_PROFILE semantics=host_session_and_submit_wait weight_bytes_exclude_scales pure_gpu_time=UNKNOWN tokens=%zu dropped=%zu\n", used, dropped); + for (size_t t = 0; t < used; ++t) { + fprintf(stderr, "DECODE_TOKEN token=%zu wall_ns=%" PRIu64 " launches=%u\n", t, tokens[t].end_ns - tokens[t].start_ns, tokens[t].pos); + for (int s = 0; s < STAGES; ++s) { + Row *r = &tokens[t].stage[s]; + fprintf(stderr, "DECODE_STAGE token=%zu stage=%s calls=%" PRIu64 " bytes=%" PRIu64 " session_ns=%" PRIu64 " submit_wait_ns=%" PRIu64 " gap_before_ns=%" PRIu64 "\n", + t, names[s], r->calls, r->bytes, r->session_ns, r->submit_wait_ns, r->gap_before_ns); + } + } +} +#else +#include +int main(void) { + uint32_t args[32] = {0}; + OmegaGpuLaunch l = { .args = args, .n_args = OMEGA_FP8_ARGS_WORDS, .grid_y = 8 }; + uint64_t bytes; + args[8] = 2048 * 4; + assert(classify(&l, &bytes) == DOWN && bytes == 8ull * 2048 * 768); + l.grid_y = 7; + assert(classify(&l, &bytes) == OTHER); + record(HEAD, 0, 0, 1, 1, 0); + for (unsigned i = 0; i < 289; i++) record(i < 288 ? i % 6 : HEAD, 10, 2 + i * 3, 4 + i * 3, 1, 0); + assert(used == 1 && tokens[0].pos == 289); + uint64_t sum = 0; + for (int s = 0; s < STAGES; s++) sum += tokens[0].stage[s].session_ns + tokens[0].stage[s].gap_before_ns; + assert(sum == tokens[0].end_ns - tokens[0].start_ns); + /* Swapped/missing/failed stages must never become a decode timing. */ + record(O, 0, 1000, 1001, 1, 0); + record(HEAD, 0, 1002, 1003, 1, 0); + assert(used == 1); + record(QKV, 0, 1004, 1005, 1, -1); + record(HEAD, 0, 1006, 1007, 1, 0); + assert(used == 1); + printf("PROFILE_HOST_PASS sequence, accounting, malformed shape, missing stage, failed launch; %s\n", names[HEAD]); +} +#endif