Skip to content

Improvement: Provide static typed function implementations in gemmini.h? #45

@T-K-233

Description

@T-K-233

Currently, the datatype of the software program is determined at compile time by the typedefs in gemmini_params.h:

typedef int8_t elem_t;
static const elem_t elem_t_max = 127;
static const elem_t elem_t_min = -128;
typedef int32_t acc_t;
typedef int64_t full_t;

However, this does not work if in a single design, we wish to run multiple gemmini program with different datatypes (for example, running fp32 and fp16 in a single program).

Hence, is it possible to provide a set of statically typed function routines, so the software can use the corresponding function for each datatype? (e.g. providing tiled_matmul_auto_f16, tiled_matmul_auto_f32, tiled_matmul_auto_i8 in addition to the default tiled_matmul_auto?)

To maintain backward compatibility, we can still typedef or macro define the elem_t to be a certain type, and let the compiler handle the function selection process in the default tiled_matmul_auto.

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