STATUS: UNTESTED CODE PROTOTYPE. Written in one pass and deliberately not executed or evaluated by the author during development, per the project owner's instruction: the idea is published early so people with the right hardware can run it and report what happens. Expect defects. Nothing here is a verified claim.
A mixed natural-language request - "send an email to Dana about Friday and compute 5+5" - is split into subtasks that are dispatched to different execution paths in parallel, then combined back into one high-level answer:
mixed request
|
parser.py rule-based split into typed subtasks
|
router.py paths run concurrently (bounded thread pool)
|-------------------------------|
compute path email path (draft-only)
ONE batch: encode all handle_email() stages a draft,
arithmetic as (op,a,b) lanes never sends
|
backend = "cpu" (default): cpu_evaluate() reference
backend = "cuda" (optional): cuda/compute_kernel.cu via a
caller-compiled shared library -
UNTESTED, fails loudly if missing
|-------------------------------|
api.py combined structured result, input order preserved
The low-level half is the CUDA kernel designed to evaluate a whole batch
of arithmetic expressions in one grid-stride pass. The high-level half is
api.handle(...), where the caller never sees the split or the launch
geometry.
cpu_evaluate() states the intended
per-lane semantics; equivalence with the kernel - including float
precision - is unverified until a GPU owner compiles the kernel,
compares outputs, and reports. Requesting compute_backend="cuda"
without the compiled library raises CudaBackendUnavailable; it never
falls back to CPU silently.parser.py later; none is claimed now.compose callable) and returned.
Sending as a person would require that person's explicit approval and
account - deliberately out of scope here.5+5 or 3.5*2 - no
parentheses, operator precedence chains, negatives, or variables.and / then / , / ; with no dependency
semantics: "compute 5+5 and email the result" becomes two independent
tasks, and the email draft will not contain the result.unrouted, never guessed.MIT - see LICENSE. This covers this package's own source code only; it says nothing about any dataset or model.
nvcc --shared -Xcompiler -fPIC -o mixroute_kernel.so cuda/compute_kernel.cuexport MIXROUTE_CUDA_LIB=/path/to/mixroute_kernel.so and call
api.handle("compute 5+5 and 3*2", compute_backend="cuda").cpu_evaluate on the same inputs and report matches
or mismatches as an issue - a useful first external test report.mixroute/parser.py - rule-based splitter (placeholder for a learned router)mixroute/router.py - concurrent dispatch, batched compute, bounded workersmixroute/paths/compute_path.py - batch encoding, CPU reference, CUDA launchermixroute/paths/email_path.py - draft-only email connectormixroute/api.py - high-level entry pointcuda/compute_kernel.cu - untested GPU kernel + ctypes host wrapperexample_usage.py - intended call pattern (not executed)Directed by Vitali Pavlovski; designed and written by his AI assistant. Not executed or evaluated by the author during development - first reports welcome.