Skip to content

Python quantizer cannot write Conv1d and ConvTranspose1d weights #113

Open

Description

@chmjkb

#97 lets the runtime load quantized Conv1d and ConvTranspose1d weights, but runntime quantize (tools/python) cannot write them, so no real file exists for that path.

What is wrong in tools/python/src/runntime_tools/cli.py:

  • skip_reason skips every tensor that is not 2D, so conv weights stay float.
  • The shape checks (in a multiple of 8, out a multiple of 4 or 8) are Linear rules. They skip convs the runtime handles, such as a conv with 1 output channel, and test the wrong axes for ConvTranspose1d.

What to do:

  • Flatten a weight of any rank to [shape[0], rest] and quantize it along each row, as the runtime expects: [out, in·kernel] for Conv1d, [in, out·kernel] for ConvTranspose1d. The quantizer stays layer-agnostic.
  • Drop the Linear-only shape checks, keeping only that the group size divides the row.
  • Add a golden conv fixture that the TypeScript tests load.

Activity

  1. added theissue type on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions