Github上PipeCNN環境配置說明
阿新 • • 發佈:2019-02-01
摘要:
要執行Github上的PipeCNN程式碼,需要安裝Intel OpenCL 和 Intel(Altera) OpenCL for FPGA。 安裝順序不要變,要先安裝Intel OpenCL,後安裝Intel(Altera) OpenCL for FPGA。否則可能出現“No Device founded"。安裝Intel OpenCL按照Intel官方安裝指南“Getting Started in Linux with Intel® SDK for OpenCL™ Applications”,intel opencl 分為三步。前兩步要先下載‘script', 然後按照指令順序執行。- 在第一步安裝過程中,執行最後一條命令後,在terminal中會有較長時間的靜止狀態,其實安裝依然在進行中,一定不要停止terminal,耐心等待。第一步一共大約需要1個小時來安裝。
- 執行第二步時,在將'script'改為 '.sh' 檔案後,需要在permission中將其選中“Allow executing file as program", 然後才能執行該'script'。接下來安裝之前自行下載的SDK安裝包。
- 暫時可不安裝第三步。
Quartus Prime Shell
Version 17.1.0 Build 590 10/25/2017 SJ Standard Edition
Copyright (C) 2017 Intel Corporation. All rights reserved.
Makefile:139: recipe for target 'conv.aocx' failed
make: *** [conv.aocx] Error 1而在最後執行 "./run.exe conv.aocx" 時會出現如下錯誤提示:***************************************************
PipeCNN: An OpenCL-Based FPGA Accelerator for CNNs
***************************************************
ERROR: CL_DEVICE_NOT_FOUND
Location: ../common/ocl_util.cpp:325
Query for number of devices failed
Note: 如果只執行模擬,不要忽略以下提示:If you want to run software simulations, please change FLOW = hw in the makefile to sw_emu, and source setup_emu.sh before running.將下載下來的模型的權重等資料放在data資料夾下,然後將整個data資料夾複製進project資料夾中,參考如下路徑:const char *weight_file_path = "./data/data_alex/weights.dat";
const char *input_file_path = "./data/data_alex/image.dat";
const char *ref_file_path = "./data/data_alex/fc8.dat";
const char *dump_file_path = "./result_dump.txt";其中,'.' 代表run.exe所在的路徑。