﻿# Pallas interpret mode: CPU correctness evidence does not validate the target GPU kernel

Use Pallas interpret mode to inspect algorithmic behavior while separating it from target-backend compilation, hardware restrictions and performance evidence.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-pallas-interpret-mode-evidence-boundary/
Language: en

## State what the CPU experiment established

A developer validates a Pallas preprocessing kernel on a laptop and reports that it is ready for every GPU worker. The [pallas_call reference](https://docs.jax.dev/en/latest/_autosummary/jax.experimental.pallas.pallas_call.html) describes interpret mode as a JAX execution over the grid that can run on CPU. This gives useful evidence about the implemented calculation. It does not prove that the target backend accepts the kernel or that the worker hardware supports the chosen lowering path.

## Separate algorithm tests from backend tests

Compare the interpreter output with an independent array reference on revealing inputs. Include partial shapes, boundary conditions and each meaningful numerical branch. Then run a target-backend compilation and execution check for the actual deployment environment. Keep the reports separate so a later backend failure is not dismissed because a CPU fixture passed. A debugging path and a production kernel can share mathematical intent while imposing different constraints on supported operations and execution arrangements.

## Inspect current backend restrictions

The [Pallas quickstart](https://docs.jax.dev/en/latest/pallas/quickstart.html) marks the interface experimental and describes backend and hardware requirements. Check the installed version and selected backend before preparing a fleet-wide compatibility claim. An interpreted kernel can be useful on a machine that cannot execute the intended accelerator lowering. Preserve the actual compiler environment and target architecture in a validation record rather than describing support only through the broad label CUDA or the presence of a GPU.

## Do not depend on debugging artifacts

The [Pallas changelog](https://docs.jax.dev/en/latest/pallas/CHANGELOG.html) documents diagnostic padding behavior that should not be treated as a custom-kernel guarantee. A test should establish valid-input behavior through explicit bounds and mathematical rules rather than rely on a particular diagnostic value appearing outside the logical array. The same principle applies to an apparently convenient observed execution order: derive required dependencies from the supported kernel contract, not from the order seen in one interpreted debugging session.

## Measure the execution path the report names

After correctness and compatibility checks, measure the actual target kernel with suitable completion boundaries and representative inputs. The guides on [cross-stream dependencies](/journal/learn-cross-stream-event-dependency/) and [tensor memory contracts](/journal/learn-tensor-memory-descriptor/) provide related context. Do not publish interpreter timing as accelerator throughput or extrapolate target performance from CPU execution. A useful validation record names its execution path, tested hardware and unresolved constraints so the evidence supports exactly the deployment claim being made.
