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.
Currently, the datatype of the software program is determined at compile time by the typedefs in gemmini_params.h:
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_i8in addition to the defaulttiled_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.