Skip to content

Native Matrix Types (OpTypeMatrix) #49

@newgpudev

Description

@newgpudev

I want to use the native matrix types in spirv and the corresponding instructions (e.g. OpMatrixTimesMatrix) but in C++ there is no way to specify a matrix type like you can for vectors:

from my understanding vectors can be emitted by using the following in C++ code:
typedef float native_vec4 __attribute__((ext_vector_type(4)));

which will generate a LLVM::VectorTypeKind that is lowered to spirv OpTypeVector.

What is the equivalent for matrix types? Can I just use an array of native_vec4?

Similarly, I want to use cooperative matrices - these are a bit different from the native matrix types and are more abstract.

Is there a clean way to support these with stock Clang and shady? I do not want to take the Clang hacking route :(. Thanks a lot!

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