Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
T-K-233 opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@T-K-233
Copy link
Member

T-K-233 commented Jul 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant