mixroute - mixed-request parallel routing prototype

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.

The idea

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.

Honest boundaries

Parser limitations (read before feeding it real requests)

License

MIT - see LICENSE. This covers this package's own source code only; it says nothing about any dataset or model.

If you have a GPU and want to help

  1. Compile the kernel: nvcc --shared -Xcompiler -fPIC -o mixroute_kernel.so cuda/compute_kernel.cu
  2. export MIXROUTE_CUDA_LIB=/path/to/mixroute_kernel.so and call api.handle("compute 5+5 and 3*2", compute_backend="cuda").
  3. Compare against cpu_evaluate on the same inputs and report matches or mismatches as an issue - a useful first external test report.

Layout

Authorship

Directed by Vitali Pavlovski; designed and written by his AI assistant. Not executed or evaluated by the author during development - first reports welcome.