CSL-KU / firesim-nvdla

FireSim-NVDLA: NVIDIA Deep Learning Accelerator (NVDLA) Integrated with RISC-V Rocket Chip SoC Running on the Amazon FPGA Cloud
Other
161 stars 31 forks source link

how to check the performance of the FPGA running firesim-nvdla #11

Open CristinaZN opened 5 years ago

CristinaZN commented 5 years ago

i successfully run the single node simulation and also i tried the dark-net on f1. How to get the performance like areas, LUTs, power.

farzadfch commented 5 years ago

For the number of LUTs, you can build the hardware (see Building Your Own Hardware in README), and check the area report in the build results. Maybe I can better help you if you tell me what you exactly want to achieve.

CristinaZN commented 5 years ago

thank you so much.

the specific question is: i want to replace some module in nvdla/hw, for example the camc, and then re-build firesim-nvdla to check the performance.

CristinaZN commented 4 years ago

can i clone this firesim-nvdla repo and just use "firesim buildafi" to run the nvdla and darknet?

farzadfch commented 4 years ago

firesim buildafi is used for building hardware. This is the command that you want to use to get the LUT number.

If you want the LUT number only for nvdla and you do not care about the LUT number of rest of the Rocket Chip, you may want to just synthesize nvdla in Vivado. That saves you on the synthesis and place and route time.

On Thu, 5 Dec 2019 at 08:10, CristinaZN notifications@github.com wrote:

can i clone this firesim-nvdla repo and just use "firesim buildafi" to run the nvdla and darknet?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6UPOR5ACRUBSWBGUELQXEDUNA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGA2KCY#issuecomment-562144523, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6TTDJTER76FWV6RJFDQXEDUNANCNFSM4JTFIKQQ .

CristinaZN commented 4 years ago

can i modify the target-design/firechip/nvidia-dla-blocks/hw/vmod and use firesim launchrunfarm, infrasetup, runworkload to get a new design?

farzadfch commented 4 years ago

The verilog is in nvidia-dla-blocks/vsrc/large directory. After modifying the verilog, you need to run firesim buildafi to build your custom hardware.

On Sun, Dec 8, 2019, 12:39 AM CristinaZN notifications@github.com wrote:

can i modify the target-design/firechip/nvidia-dla-blocks/hw/vmod and use firesim launchrunfarm, infrasetup, runworkload to get a new design?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6U6OBH742RFP4CAH7DQXSJCVA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGXDEI#issuecomment-562917777, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6SSJ7QWDTLFQJ6X5SDQXSJCVANCNFSM4JTFIKQQ .

CristinaZN commented 4 years ago

thanks for your reply. may i make sure if i understand your explanation. i only need to modify the verilogs in nvidia-dla-blocks/vsrc/large, and leave those config in config_*.ini unchanged, and firesim buildafi?

farzadfch commented 4 years ago

After running firesim buildafi you get a new AGFI. You need to replace the AGFI for firesim-quadcore-no-nic-nvdla-ddr3-llc4mb in config_hwdb.ini.

On Sun, Dec 8, 2019, 3:45 AM CristinaZN notifications@github.com wrote:

thanks for your reply. may i make sure if i understand your explanation. i only need to modify the verilogs in nvidia-dla-blocks/vsrc/large, and leave those config in config_*.ini unchanged, and firesim buildafi?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6SV3MD76H2DL6QN533QXS65JA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGZ2QI#issuecomment-562928961, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6UT6TJKY73QWQAJOELQXS65JANCNFSM4JTFIKQQ .

farzadfch commented 4 years ago

And before running firesim buildafi, you need to make sure that firesim-quadcore-no-nic-nvdla-ddr3-llc4mb is uncommented in configbuild.ini and other targets are commented. You should not need to edit anything else in config*.ini.

CristinaZN commented 4 years ago

it's very helpful. thanks a lot! If i disconnected ssh to firesim manager, does it affect the c5 ? how can i re attach to the screen ?

farzadfch commented 4 years ago

No problem. Use tmux.

On Mon, 9 Dec 2019 at 02:03, CristinaZN notifications@github.com wrote:

it's very helpful. thanks a lot! If i disconnected ssh to firesim manager, does it affect the c5 ? how can i re attach to the screen ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6V4VJWWVKCBGLTIFK3QXX3WTA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGIG2TA#issuecomment-563113292, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6TIWW4JG5L5SAETMF3QXX3WTANCNFSM4JTFIKQQ .

CristinaZN commented 4 years ago

i redetach to the c5 , and found those messages. it seems that all synthesis passed. but how to solve this problem.... 2019-12-09 21:24:38,819 [aws_build ] [DEBUG]
2019-12-09 21:24:38,820 [flush ] [DEBUG] [localhost] local: aws ec2 create-fpga-image --input-storage-location Bucket=firesim-cristina,Key=dcp/19_12_09-083351.Developer_CL.tar-192.168.0.208-ITGFH8RO7L.tar --logs-storage-location Bucket=firesim-cristina,Key=logs/ --name "firesim-quadcore-no-nic-nvdla-ddr3-llc4mb" --description "firesim-buildtriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-deploytriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-commit:31357f963f875fc2ee37045c8655a68a276b5ff7-dirty" 2019-12-09 21:24:39,655 [flush ] [DEBUG] Fatal error: local() encountered an error (return code 255) while executing 'aws ec2 create-fpga-image --input-storage-location Bucket=firesim-cristina,Key=dcp/19_12_09-083351.Developer_CL.tar-192.168.0.208-ITGFH8RO7L.tar --logs-storage-location Bucket=firesim-cristina,Key=logs/ --name "firesim-quadcore-no-nic-nvdla-ddr3-llc4mb" --description "firesim-buildtriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-deploytriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-commit:31357f963f875fc2ee37045c8655a68a276b5ff7-dirty" ' 2019-12-09 21:24:39,655 [flush ] [DEBUG] Aborting. 2019-12-09 21:24:39,678 [ ] [ERROR] Fatal error.

farzadfch commented 4 years ago

Go to S3 Bucket from the AWS website and try to find the log for this build.

Additionally, run the command below in the manager and see if it gives you more information about the error.

aws ec2 create-fpga-image --input-storage-location Bucket=firesim-cristina,Key=dcp/19_1209-083351.Developer CL.tar-192.168.0.208-ITGFH8RO7L.tar --logs-storage-location Bucket=firesim-cristina,Key=logs/ --name "firesim-quadcore-no-nic-nvdla-ddr3-llc4mb" --description "firesim-buildtriplet:FireSimNoNIC- FireSimRocketChipQuadCoreConfig_WithNVDLALarge- FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-deploytriplet:FireSimNoNIC- FireSimRocketChipQuadCoreConfig_WithNVDLALarge- FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-commit: 31357f963f875fc2ee37045c8655a68a276b5ff7-dirty"

On Mon, Dec 9, 2019, 8:45 PM CristinaZN notifications@github.com wrote:

i redetach to the c5 , and found those messages. it seems that all synthesis passed. but how to solve this problem.... 2019-12-09 21:24:38,819 [aws_build ] [DEBUG] 2019-12-09 21:24:38,820 [flush ] [DEBUG] [localhost] local: aws ec2 create-fpga-image --input-storage-location Bucket=firesim-cristina,Key=dcp/19_12_09-083351.Developer_CL.tar-192.168.0.208-ITGFH8RO7L.tar --logs-storage-location Bucket=firesim-cristina,Key=logs/ --name "firesim-quadcore-no-nic-nvdla-ddr3-llc4mb" --description "firesim-buildtriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-deploytriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-commit:31357f963f875fc2ee37045c8655a68a276b5ff7-dirty" 2019-12-09 21:24:39,655 [flush ] [DEBUG] Fatal error: local() encountered an error (return code 255) while executing 'aws ec2 create-fpga-image --input-storage-location Bucket=firesim-cristina,Key=dcp/19_12_09-083351.Developer_CL.tar-192.168.0.208-ITGFH8RO7L.tar --logs-storage-location Bucket=firesim-cristina,Key=logs/ --name "firesim-quadcore-no-nic-nvdla-ddr3-llc4mb" --description "firesim-buildtriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-deploytriplet:FireSimNoNIC-FireSimRocketChipQuadCoreConfig_WithNVDLALarge-FireSimDDR3FRFCFSLLC4MBConfig75MHz,firesim-commit:31357f963f875fc2ee37045c8655a68a276b5ff7-dirty" ' 2019-12-09 21:24:39,655 [flush ] [DEBUG] Aborting. 2019-12-09 21:24:39,678 [ ] [ERROR] Fatal error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6WCNN3MHAIQ2DFWFATQX37GFA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGMFOGA#issuecomment-563631896, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6TMBBJC32SNZE57L6TQX37GFANCNFSM4JTFIKQQ .

CristinaZN commented 4 years ago

ok, i get a new AFGI, and i replace the AFGI id in config_hwdb.ini with the new one. But when i do firesim infrasetup, i encountered the problem: 2019-12-10 09:23:04,522 [instance_log] [INFO ] [192.168.0.91] Flashing FPGA Slot: 0 with agfi: agfi-039ec091f24dffcb4. 2019-12-10 09:23:04,523 [flush ] [DEBUG] [192.168.0.91] run: sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: Error: (5) invalid-afi-id 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: The agfi id passed is invalid or you do not have permission to load 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: the AFI. 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: 2019-12-10 09:23:05,659 [flush ] [DEBUG] Fatal error: run() received nonzero return code 5 while executing! 2019-12-10 09:23:05,660 [flush ] [DEBUG] Requested: sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A 2019-12-10 09:23:05,660 [flush ] [DEBUG] Executed: /bin/bash -l -c "sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A" 2019-12-10 09:23:05,660 [flush ] [DEBUG] Aborting. 2019-12-10 09:23:05,682 [ ] [ERROR] Fatal error.

farzadfch commented 4 years ago

How did you get the AGFI? Try to query the state of AGFI with describe-fpga-images. https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-fpga-images.html

On Tue, 10 Dec 2019 at 03:29, CristinaZN notifications@github.com wrote:

ok, i get a new AFGI, and i replace the AFGI id in config_hwdb.ini with the new one. But when i do firesim infrasetup, i encountered the problem: 2019-12-10 09:23:04,522 [instance_log] [INFO ] [192.168.0.91] Flashing FPGA Slot: 0 with agfi: agfi-039ec091f24dffcb4. 2019-12-10 09:23:04,523 [flush ] [DEBUG] [192.168.0.91] run: sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: Error: (5) invalid-afi-id 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: The agfi id passed is invalid or you do not have permission to load 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: the AFI. 2019-12-10 09:23:05,659 [flush ] [DEBUG] [192.168.0.91] out: 2019-12-10 09:23:05,659 [flush ] [DEBUG] Fatal error: run() received nonzero return code 5 while executing! 2019-12-10 09:23:05,660 [flush ] [DEBUG] Requested: sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A 2019-12-10 09:23:05,660 [flush ] [DEBUG] Executed: /bin/bash -l -c "sudo fpga-load-local-image -S 0 -I agfi-039ec091f24dffcb4 -A" 2019-12-10 09:23:05,660 [flush ] [DEBUG] Aborting. 2019-12-10 09:23:05,682 [ ] [ERROR] Fatal error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSL-KU/firesim-nvdla/issues/11?email_source=notifications&email_token=ACDWA6XKXBQOVILXT2LME6LQX5OPFA5CNFSM4JTFIKQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGOR7AQ#issuecomment-563945346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDWA6ROZ6YOBR2VW5SWMWTQX5OPFANCNFSM4JTFIKQQ .

CristinaZN commented 4 years ago

i get AGFI from logs.
i tried to build it again and it works. many thanks!!

farzadfch commented 4 years ago

Awesome!