Skip to content

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

@aqjune-aws

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions