We should implement a test generator for checking batched primitives like the one we use for grad testing.