Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

The trace output of KLR may have a statement that is not well-formed #129

Description

@aqjune-aws

Specifically, when nki_matmul_basic_ is traced:

KLR.Core.Stmt.assign
             "4"
             (KLR.Core.Expr.call
               "nki.language.matmul"
               [KLR.Core.Value.access
                  (KLR.Core.Access.simple
                    { name := "load.27.13",
                      dtype := KLR.Core.Dtype.float32,
                      shape := { parDim := 128, freeDims := [64] },
                      address := { memory := KLR.Core.Memory.sbuf,
                                   size := (128, 256),
                                   partitionOffset := none,
                                   freeOffset := none,
                                   parent := none },
                      parWF := _,
                      freeWF := _ }),
                KLR.Core.Value.access
                  (KLR.Core.Access.simple
                    { name := "load.28.13",
                      dtype := KLR.Core.Dtype.float32,
                      shape := { parDim := 128, freeDims := [512] },
                      address := { memory := KLR.Core.Memory.sbuf,
                                   size := (128, 2048),
                                   partitionOffset := none,
                                   freeOffset := none,
                                   parent := none },
                      parWF := _,
                      freeWF := _ })]
               [("transpose_x", KLR.Core.Value.bool true)]),
KLR.Core.Stmt.assign
             "5"
             (KLR.Core.Expr.call
               "nki.language.copy"
               [KLR.Core.Value.var "4"]
               [("dtype", KLR.Core.Value.var "nki.language.float32")]),
...

At the KLR Core level, we should not have anything that does not have a corresponding ISA (or BIR) representation. Let's replace call with store.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions