51ca5a34ba
rkt_gemm_plan() partitions an MxN (full-K) output into <=tile_m x tile_n sub-matmuls; rkt_gemm_op_fits() confirms a shape fits one rocket op via the verified builder. First slice of the CPU+NPU backend: lets a gemma-scale GEMM be expressed as many NPU ops. K-tiling (DPU partial-sum accumulation) deferred. selftest: exact coverage of 64x200 by 8 tiles, every tile fits one op (K=64), impossible-K reported unfit. Golden match unaffected. ALL PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
637 B
Makefile
27 lines
637 B
Makefile
# Rosenblatt npu-probe — host build + structural self-test.
|
|
# `make test` needs no libdrm; `make lib` builds the ioctl wrapper (needs libdrm-dev).
|
|
CC ?= gcc
|
|
CFLAGS ?= -Wall -Wextra -O2
|
|
|
|
EMIT_OBJS = rkt_matmul_cna.o rkt_matmul_coredpu.o rkt_matmul.o rkt_gemm.o
|
|
|
|
.PHONY: all test lib clean
|
|
all: selftest
|
|
|
|
selftest: selftest.o $(EMIT_OBJS)
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
# The DRM/ioctl wrapper is compiled separately — it pulls in <drm/...> headers.
|
|
lib: librocket.o
|
|
librocket.o: librocket.c
|
|
$(CC) $(CFLAGS) -I/usr/include/drm -c -o $@ $<
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
test: selftest
|
|
./selftest
|
|
|
|
clean:
|
|
rm -f *.o selftest
|