vortexgpgpu / vortex

https://vortex.cc.gatech.edu/
Apache License 2.0
1.23k stars 261 forks source link

Vortex 2.1 opae runtime issue #127

Open Geunyoung00 opened 5 months ago

Geunyoung00 commented 5 months ago

When I run Quick demo with opae driver, there are meaningless performance prints. it seems to take place only in opae driver.

test-pc@testpc-desktop:~/vortex/build$ ./ci/blackbox.sh --driver=opae --app=vecadd CONFIGS=-DNUM_CLUSTERS=1 -DNUM_CORES=1 -DNUM_WARPS=4 -DNUM_THREADS=4 running: CONFIGS=-DNUM_CLUSTERS=1 -DNUM_CORES=1 -DNUM_WARPS=4 -DNUM_THREADS=4 make -C ./ci/../runtime/opae running: make -C ./ci/../tests/opencl/vecadd run-opae make: Entering directory '/home/test-pc/vortex/build/tests/opencl/vecadd' g++ -std=c++11 -Wall -Wextra -Wfatal-errors -Wno-deprecated-declarations -Wno-unused-parameter -Wno-narrowing -pthread -I/home/test-pc/tools/pocl/runtime/include -O2 -DNDEBUG main.cc.o -L/home/test-pc/vortex/build/runtime/stub -lvortex -L/home/test-pc/tools/pocl/runtime/lib -lOpenCL -o vecadd SCOPE_JSON_PATH=/home/test-pc/vortex/build/runtime/opae/scope.json OPAE_DRV_PATHS=libopae-c-sim.so LD_LIBRARY_PATH=/home/test-pc/tools/pocl/runtime/lib:/home/test-pc/vortex/build/runtime/opae:”/usr”/lib:/home/test-pc/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib:/home/test-pc/inteldevstack/intelFPGA_pro/19.2/hld/host/linux64/lib:/home/test-pc/inteldevstack/intelFPGA_pro/19.2/hld/linux64/lib: ./vecadd -n64 Workload size=64 PERF: instrs=0, cycles=0, IPC=-nan PERF: instrs=0, cycles=0, IPC=-nan PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 Create context Allocate device buffers Create program from kernel source Upload source buffers PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 Execute the kernel PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=-4995072469926809587, cycles=-4995072469926809587, IPC=1.000000 PERF: instrs=0, cycles=0, IPC=-nan PERF: instrs=0, cycles=0, IPC=-nan PERF: instrs=9159, cycles=14830, IPC=0.617599 Elapsed time: 926 ms Download destination buffer PERF: instrs=9159, cycles=14830, IPC=0.617599 PERF: instrs=9159, cycles=14830, IPC=0.617599 Verify result PASSED! make: Leaving directory '/home/test-pc/vortex/build/tests/opencl/vecadd'

I found the "PERF: ~~" is printed by the public function "int ready_wait()" in runtime/opae/vortex.cpp. There are many functions calling "ready_wait()" (eg, upload, download ..) So the "PERF ~~" keep printing. As a temporary measure, I just commented the profilling_end() in the "int read_wait()" and added another ready_wait_blah which is not commented profilling_end(). And then changed "device->ready_wait(time_out)" to the new ready_wait_blah in "vx_ready_wait()" function.

I think this is not a proper way, So I upload here that somebody can modify it.

And the api.fpgaProperiesGetLocalMemorySize error still exist in vortex2.1. I cannot understand this function because it doesn't looks to affect to running.

test-pc@testpc-desktop:~/vortex_2.1/build$ TARGET=fpga ./ci/blackbox.sh --driver=opae --app=vecadd CONFIGS=-DNUM_CLUSTERS=1 -DNUM_CORES=1 -DNUM_WARPS=4 -DNUM_THREADS=4 running: CONFIGS=-DNUM_CLUSTERS=1 -DNUM_CORES=1 -DNUM_WARPS=4 -DNUM_THREADS=4 make -C ./ci/../runtime/opae running: make -C ./ci/../tests/opencl/vecadd run-opae make: Entering directory '/home/test-pc/vortex_2.1/build/tests/opencl/vecadd' g++ -std=c++11 -Wall -Wextra -Wfatal-errors -Wno-deprecated-declarations -Wno-unused-parameter -Wno-narrowing -pthread -I/home/test-pc/tools/pocl/runtime/include -O2 -DNDEBUG main.cc.o -L/home/test-pc/vortex_2.1/build/runtime/stub -lvortex -L/home/test-pc/tools/pocl/runtime/lib -lOpenCL -o vecadd SCOPE_JSON_PATH=/home/test-pc/vortex_2.1/build/runtime/opae/scope.json OPAE_DRV_PATHS=libopae-c.so LD_LIBRARY_PATH=/home/test-pc/tools/pocl/runtime/lib:/home/test-pc/vortex_2.1/build/runtime/opae:”/usr”/lib:/home/test-pc/inteldevstack/a10_gx_pac_ias_1_2_1_pv/opencl/opencl_bsp/linux64/lib:/home/test-pc/inteldevstack/intelFPGA_pro/19.2/hld/host/linux64/lib:/home/test-pc/inteldevstack/intelFPGA_pro/19.2/hld/linux64/lib: ./vecadd -n64 Workload size=64 [VXDRV] Error: 'api_.fpgaPropertiesGetLocalMemorySize(filter, &global_mem_size_)' returned 6, not supported! Create context Allocate device buffers Create program from kernel source Upload source buffers Execute the kernel PERF: core0: instrs=4308, cycles=16816, IPC=0.256185 PERF: core1: instrs=4309, cycles=16815, IPC=0.256259 PERF: core2: instrs=4309, cycles=16813, IPC=0.256290 PERF: core3: instrs=4309, cycles=16814, IPC=0.256275 PERF: instrs=17235, cycles=16816, IPC=1.024917 Elapsed time: 7 ms Download destination buffer Verify result PASSED! make: Leaving directory '/home/test-pc/vortex_2.1/build/tests/opencl/vecadd'

kmzaja commented 3 months ago

The --driver=opae prints are really annoying indeed. Thank you for posting the workaround. I think they haven't changed this yet.