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

Generate.py i_mvm Assertion error #63

Open
omerXfaruq opened this issue Apr 17, 2023 · 3 comments
Open

Generate.py i_mvm Assertion error #63

omerXfaruq opened this issue Apr 17, 2023 · 3 comments

Comments

@omerXfaruq
Copy link

omerXfaruq commented Apr 17, 2023

Hello,

I've been following how_to_run step by step, however I'm getting assertion erros in i_mvm, I tried to use all of the i_mvm implementations available but all of them give the same error.

Could how to run guide be outdated? Is there any updated versions or forks of the repo?

(.venv) ➜  test git:(master) ✗ bash generate-py.sh
*.puma lstm-layer-tile0-core0.puma lstm-layer-tile0-core1.puma lstm-layer-tile0-core2.puma lstm-layer-tile0-core3.puma lstm-layer-tile0-core4.puma lstm-layer-tile0-core5.puma lstm-layer-tile0-core6.puma lstm-layer-tile0-core7.puma lstm-layer-tile0.puma lstm-layer-tile1-core0.puma lstm-layer-tile1-core1.puma lstm-layer-tile1-core2.puma lstm-layer-tile1-core3.puma lstm-layer-tile1-core4.puma lstm-layer-tile1-core5.puma lstm-layer-tile1-core6.puma lstm-layer-tile1-core7.puma lstm-layer-tile1.puma lstm-layer-tile10-core0.puma lstm-layer-tile10-core1.puma lstm-layer-tile10-core2.puma lstm-layer-tile10-core3.puma lstm-layer-tile10-core4.puma lstm-layer-tile10-core5.puma lstm-layer-tile10-core6.puma lstm-layer-tile10-core7.puma lstm-layer-tile10.puma lstm-layer-tile11-core0.puma lstm-layer-tile11-core1.puma lstm-layer-tile11-core2.puma lstm-layer-tile11-core3.puma lstm-layer-tile11-core4.puma lstm-layer-tile11-core5.puma lstm-layer-tile11-core6.puma lstm-layer-tile11-core7.puma lstm-layer-tile11.puma lstm-layer-tile12-core0.puma lstm-layer-tile12-core1.puma lstm-layer-tile12-core2.puma lstm-layer-tile12-core3.puma lstm-layer-tile12-core4.puma lstm-layer-tile12-core5.puma lstm-layer-tile12-core6.puma lstm-layer-tile12-core7.puma lstm-layer-tile12.puma lstm-layer-tile13-core0.puma lstm-layer-tile13-core1.puma lstm-layer-tile13-core2.puma lstm-layer-tile13-core3.puma lstm-layer-tile13-core4.puma lstm-layer-tile13-core5.puma lstm-layer-tile13-core6.puma lstm-layer-tile13-core7.puma lstm-layer-tile13.puma lstm-layer-tile14-core0.puma lstm-layer-tile14-core1.puma lstm-layer-tile14-core2.puma lstm-layer-tile14-core3.puma lstm-layer-tile14-core4.puma lstm-layer-tile14-core5.puma lstm-layer-tile14-core6.puma lstm-layer-tile14-core7.puma lstm-layer-tile14.puma lstm-layer-tile15-core0.puma lstm-layer-tile15-core1.puma lstm-layer-tile15-core2.puma lstm-layer-tile15-core3.puma lstm-layer-tile15-core4.puma lstm-layer-tile15-core5.puma lstm-layer-tile15-core6.puma lstm-layer-tile15-core7.puma lstm-layer-tile15.puma lstm-layer-tile16-core0.puma lstm-layer-tile16-core1.puma lstm-layer-tile16-core2.puma lstm-layer-tile16-core3.puma lstm-layer-tile16-core4.puma lstm-layer-tile16-core5.puma lstm-layer-tile16-core6.puma lstm-layer-tile16-core7.puma lstm-layer-tile16.puma lstm-layer-tile17-core0.puma lstm-layer-tile17-core1.puma lstm-layer-tile17-core2.puma lstm-layer-tile17-core3.puma lstm-layer-tile17-core4.puma lstm-layer-tile17-core5.puma lstm-layer-tile17-core6.puma lstm-layer-tile17-core7.puma lstm-layer-tile17.puma lstm-layer-tile18-core0.puma lstm-layer-tile18-core1.puma lstm-layer-tile18-core2.puma lstm-layer-tile18-core3.puma lstm-layer-tile18-core4.puma lstm-layer-tile18-core5.puma lstm-layer-tile18-core6.puma lstm-layer-tile18-core7.puma lstm-layer-tile18.puma lstm-layer-tile19-core0.puma lstm-layer-tile19-core1.puma lstm-layer-tile19-core2.puma lstm-layer-tile19-core3.puma lstm-layer-tile19-core4.puma lstm-layer-tile19-core5.puma lstm-layer-tile19-core6.puma lstm-layer-tile19-core7.puma lstm-layer-tile19.puma lstm-layer-tile2-core0.puma lstm-layer-tile2-core1.puma lstm-layer-tile2-core2.puma lstm-layer-tile2-core3.puma lstm-layer-tile2-core4.puma lstm-layer-tile2-core5.puma lstm-layer-tile2-core6.puma lstm-layer-tile2-core7.puma lstm-layer-tile2.puma lstm-layer-tile20-core0.puma lstm-layer-tile20-core1.puma lstm-layer-tile20-core2.puma lstm-layer-tile20-core3.puma lstm-layer-tile20-core4.puma lstm-layer-tile20-core5.puma lstm-layer-tile20-core6.puma lstm-layer-tile20-core7.puma lstm-layer-tile20.puma lstm-layer-tile21-core0.puma lstm-layer-tile21-core1.puma lstm-layer-tile21-core2.puma lstm-layer-tile21-core3.puma lstm-layer-tile21-core4.puma lstm-layer-tile21-core5.puma lstm-layer-tile21-core6.puma lstm-layer-tile21-core7.puma lstm-layer-tile21.puma lstm-layer-tile22-core0.puma lstm-layer-tile22-core1.puma lstm-layer-tile22-core2.puma lstm-layer-tile22-core3.puma lstm-layer-tile22-core4.puma lstm-layer-tile22-core5.puma lstm-layer-tile22-core6.puma lstm-layer-tile22-core7.puma lstm-layer-tile22.puma lstm-layer-tile23-core0.puma lstm-layer-tile23-core1.puma lstm-layer-tile23-core2.puma lstm-layer-tile23-core3.puma lstm-layer-tile23-core4.puma lstm-layer-tile23-core5.puma lstm-layer-tile23-core6.puma lstm-layer-tile23-core7.puma lstm-layer-tile23.puma lstm-layer-tile24-core0.puma lstm-layer-tile24-core1.puma lstm-layer-tile24-core2.puma lstm-layer-tile24-core3.puma lstm-layer-tile24-core4.puma lstm-layer-tile24-core5.puma lstm-layer-tile24-core6.puma lstm-layer-tile24-core7.puma lstm-layer-tile24.puma lstm-layer-tile3-core0.puma lstm-layer-tile3-core1.puma lstm-layer-tile3-core2.puma lstm-layer-tile3-core3.puma lstm-layer-tile3-core4.puma lstm-layer-tile3-core5.puma lstm-layer-tile3-core6.puma lstm-layer-tile3-core7.puma lstm-layer-tile3.puma lstm-layer-tile4-core0.puma lstm-layer-tile4-core1.puma lstm-layer-tile4-core2.puma lstm-layer-tile4-core3.puma lstm-layer-tile4-core4.puma lstm-layer-tile4-core5.puma lstm-layer-tile4-core6.puma lstm-layer-tile4-core7.puma lstm-layer-tile4.puma lstm-layer-tile5-core0.puma lstm-layer-tile5-core1.puma lstm-layer-tile5-core2.puma lstm-layer-tile5-core3.puma lstm-layer-tile5-core4.puma lstm-layer-tile5-core5.puma lstm-layer-tile5-core6.puma lstm-layer-tile5-core7.puma lstm-layer-tile5.puma lstm-layer-tile6-core0.puma lstm-layer-tile6-core1.puma lstm-layer-tile6-core2.puma lstm-layer-tile6-core3.puma lstm-layer-tile6-core4.puma lstm-layer-tile6-core5.puma lstm-layer-tile6-core6.puma lstm-layer-tile6-core7.puma lstm-layer-tile6.puma lstm-layer-tile7-core0.puma lstm-layer-tile7-core1.puma lstm-layer-tile7-core2.puma lstm-layer-tile7-core3.puma lstm-layer-tile7-core4.puma lstm-layer-tile7-core5.puma lstm-layer-tile7-core6.puma lstm-layer-tile7-core7.puma lstm-layer-tile7.puma lstm-layer-tile8-core0.puma lstm-layer-tile8-core1.puma lstm-layer-tile8-core2.puma lstm-layer-tile8-core3.puma lstm-layer-tile8-core4.puma lstm-layer-tile8-core5.puma lstm-layer-tile8-core6.puma lstm-layer-tile8-core7.puma lstm-layer-tile8.puma lstm-layer-tile9-core0.puma lstm-layer-tile9-core1.puma lstm-layer-tile9-core2.puma lstm-layer-tile9-core3.puma lstm-layer-tile9-core4.puma lstm-layer-tile9-core5.puma lstm-layer-tile9-core6.puma lstm-layer-tile9-core7.puma lstm-layer-tile9.puma
generate-py.sh: line 14: $g: ambiguous redirect
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core0.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core1.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core2.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core3.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core4.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core5.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core6.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0-core7.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile0.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core0.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core1.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core2.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core3.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core4.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core5.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core6.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1-core7.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile1.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
lstm-layer-tile10-core0.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
Traceback (most recent call last):
  File "lstm/tile10/lstm-layer-tile10-core0.puma.py", line 49, in <module>
    i_temp = i_mvm(['111111'])
  File "/home/ubuntu22/git-repos/puma/puma-simulator/src/instrn_proto.py", line 113, in i_mvm
    assert (len(xb_nma_list) == cfg.num_matrix) # each matrix in a core has a 3-bit mask
AssertionError
lstm-layer-tile10-core1.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
Traceback (most recent call last):
  File "lstm/tile10/lstm-layer-tile10-core1.puma.py", line 53, in <module>
    i_temp = i_mvm(['111111'])
  File "/home/ubuntu22/git-repos/puma/puma-simulator/src/instrn_proto.py", line 113, in i_mvm
    assert (len(xb_nma_list) == cfg.num_matrix) # each matrix in a core has a 3-bit mask
AssertionError
lstm-layer-tile10-core2.puma
('xbar_ip_energy_dict', {'60': 170.00000000000003, '0': 170.00000000000003, '20': 170.00000000000003, '70': 170.00000000000003, '90': 170.00000000000003, '80': 170.00000000000003, '30': 170.00000000000003, '50': 170.00000000000003, '40': 170.00000000000003, '10': 170.00000000000003})
Traceback (most recent call last):
  File "lstm/tile10/lstm-layer-tile10-core2.puma.py", line 53, in <module>
    i_temp = i_mvm(['111111'])
  File "/home/ubuntu22/git-repos/puma/puma-simulator/src/instrn_proto.py", line 113, in i_mvm
    assert (len(xb_nma_list) == cfg.num_matrix) # each matrix in a core has a 3-bit mask
@omerXfaruq omerXfaruq changed the title Generate-py i_mvm Assertion error Generate.py i_mvm Assertion error Apr 17, 2023
@omerXfaruq
Copy link
Author

omerXfaruq commented Apr 17, 2023

Maybe @negishubham might know, as I saw some responses from him in other issues 😸

@negishubham
Copy link
Contributor

Hi,
Seems your inputs to the compiler and the simulator and not matching. Specifically num_matrix parameter. Please follow this comment #57 (comment).

@omerXfaruq
Copy link
Author

omerXfaruq commented Apr 20, 2023

Thanks for the reply @negishubham
Hmm, I've set this in step 4.1
For inference N_TRAINING_MVMUS_PER_CORE should be 0 in src/common.h
Are you mentioning step 6.1 num_matrix configuration? I am currently at step 5 and getting error there.
For inference, set num_matrix in config file equal to N_CONSTANT_MVMUS_PER_CORE in puma-compilersrc/common.h.

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

2 participants