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

How to correctly config BF16-Datatype in Gemmini #357

Open
haoywu-intel opened this issue May 29, 2024 · 0 comments
Open

How to correctly config BF16-Datatype in Gemmini #357

haoywu-intel opened this issue May 29, 2024 · 0 comments

Comments

@haoywu-intel
Copy link

Hello, I have built this system with chipyard 1.9.1 and gemmini v0.7.1, the example simulations (both spike and verilator) in README work well on my machine.

Now, I'm trying to modify the datatypes. I've tried the default int_8 (GemminiConfigs.defaultConfig) and FP32 (GemminiFPConfigs.FP32DefaultConfig) configs. With tiny modifications on tiled_matmul_ws.c, I can get correct matrix multiplication results for both.

However, when I set the datatype to BF16 (GemminiFPConfigs.BF16Default8Config), the gemmini seems using the uint16 type to calculate the matrix instead of BF16 type. and I noticed the following typedef in gemmini_params.h:
typedef uint16_t elem_t;

Anyone has any comments? What else I need to do to support BF16 type matrix multiplication?

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