Aayush-Ankit / puma-simulator

[ASPLOS 2019] PUMA-simulator provides a detailed simulation model of a dataflow architecture built with NVM (non-volatile memory), and runs ML models compiled using the puma compiler.
MIT License
50 stars 43 forks source link

Error when running the dpe.py #61

Closed qzylalala closed 10 months ago

qzylalala commented 1 year ago

Hi! I follow the guide to test this. python dpe.py But I got an AssertionError: assert (1==0) # Set instructions cannot write to MVMU storage

omerXfaruq commented 1 year ago

I have the same error, do you know what might be wrong, could it be related to package versions, or repo guide and startup is outdated?

More details below:

(.venv) ➜  src git:(training) ✗ python dpe.py 
('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})
('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})
/home/ubuntu22/git-repos/2puma/puma-simulator/Security/PumaFernet.py:13: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
  from cryptography.fernet import Fernet
2
Input net is large
/home/ubuntu22/git-repos/2puma/puma-simulator/test/testasm/
/home/ubuntu22/git-repos/2puma/puma-simulator/test
('Inst directory: ', '/home/ubuntu22/git-repos/2puma/puma-simulator/test/testasm/large')
('Trace directory: ', '/home/ubuntu22/git-repos/2puma/puma-simulator/test/traces/large')
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('adc_key', 'matrix_adc_0')
('adc_res', 8)
('adc_key', 'matrix_adc_1')
('adc_res', 4)
('adc_key', 'matrix_adc_2')
('adc_res', 8)
('adc_key', 'matrix_adc_3')
('adc_res', 4)
('length of input data:', 30000)
('Programming weights of tile no: ', 1)
('Programming ima no: ', 0)
('Programming ima no: ', 1)
('Programming ima no: ', 2)
('Programming ima no: ', 3)
('Programming ima no: ', 4)
('Programming ima no: ', 5)
('Programming ima no: ', 6)
('Programming ima no: ', 7)
('Programming weights of tile no: ', 2)
('Programming ima no: ', 0)
('Programming ima no: ', 1)
('Programming ima no: ', 2)
('Programming ima no: ', 3)
('Programming ima no: ', 4)
('Programming ima no: ', 5)
('Programming ima no: ', 6)
('Programming ima no: ', 7)
('Programming weights of tile no: ', 3)
('Programming ima no: ', 0)
('Programming ima no: ', 1)
('Programming ima no: ', 2)
('Programming ima no: ', 3)
('Programming ima no: ', 4)
('Programming ima no: ', 5)
('Programming ima no: ', 6)
('Programming ima no: ', 7)
('Cycle: ', 0, 'Tile halt list', [0, 0, 0, 0])
('Cycle: ', 1, 'Tile halt list', [0, 0, 0, 0])
Traceback (most recent call last):
  File "dpe.py", line 231, in <module>
    DPE().run(net)
  File "dpe.py", line 160, in run
    node_dut.node_run(cycle)
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/node.py", line 82, in node_run
    self.tile_list[i].tile_run (cycle, self.tile_fid_list[i])
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/tile.py", line 360, in tile_run
    self.tile_compute (cycle)
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/tile.py", line 115, in tile_compute
    self.ima_list[i].pipe_run (cycle, self.fid_list[i])
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/ima.py", line 1029, in pipe_run
    stage_function[i] (update_ready, fid)
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/ima.py", line 926, in execute
    do_execute (self, ex_op, fid)
  File "/home/ubuntu22/git-repos/2puma/puma-simulator/src/ima.py", line 522, in do_execute
    assert (1==0) # Set instructions cannot write to MVMU storage
AssertionError
negishubham commented 1 year ago

Hi,

I am not sure if you tried running the test scripts first. Please follow the instructions from this comment: https://github.com/Aayush-Ankit/puma-simulator/issues/57#issuecomment-1486920136

omerXfaruq commented 1 year ago

Hmm, I was actually following QuickStart and Usage from Readme @negishubham.