Skip to content

Troubleshooting

Build issues

  • Missing CUDA headers: add headers=["cuda_runtime.h"] or install CUDA toolkit.
  • PyTorch binding errors: ensure torch/extension.h is available and pass headers accordingly.
  • mkdocs build fails (strict): check missing pages referenced in mkdocs.yml and fix.

DSL errors

  • Division errors: use / for floats and // for ints; mismatches raise errors when building IR.
  • Pointer write to const: ensure your pointer mutability allows writes (ptr_mut).
  • Void* deref: you cannot val a void*; cast to a typed pointer first.

Index tools

  • Dimension equations are "frozen" when the Dims object is converted to an Indices object.
  • It is generally recommended to write all equations during a "setup" phase, invoke the indices object, then add all runtime code
  • Fractional size/roots: check equations and strides; sizes must be integral.
  • If you are having trouble with an index value being solved prematurely, debug with why_solved or why_partial.
  • Scope ancestry error: scopes can only be invoked if their parent has been invoked, but they do not have to be invoked within their parent.

Inline PTX

  • Placeholder not provided: ensure all $name or $0 placeholders have corresponding operands.
  • Operand type not supported: map to supported primitives or cast appropriately.
  • Mixed out/in names: out and in placeholder sets must be disjoint.

Codegen differences

  • Golden mismatch due to spacing or decl order: update goldens if the change is intentional (pytest --update-golden).
  • Missing headers block: headers only emit if non-empty; pass required headers to render.

Modify your installation as needed! Add error messages that help you, and make a PR :).