- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying my first OpenCL program. I installed intel OpenCL for FPGA sdk by version:
aocl 21.1.0.173.3 (Intel(R) FPGA SDK for OpenCL(TM), Version 21.1.0 Build 173.3 Pro Edition, Copyright (c) 2021 Intel Corporation)
also installed visual studio 2019 community and install the plugins followed the instructions in the aocl programming guide.
then I created one project by choosing OpenCL Project for Intel FPGA. and added C:\intelFPGA_pro\21.1\hld\init_opencl.bat to pre_build event.
(in this initial project, a cpp host file and a kernel.cl file was created, and I didn't modify any one of them.)
in the default properties a configuration called Emu Debug was created but the folder "$(SulotionDir)\x64\Emu Debug cannot be verified I guess it contains a space.
so I renamed it with sw_emu. and also add one line:
"
<CommandLineTemplate Condition="'$(Configuration)|$(Platform)'=='sw_emu|x64'">$(INTELFPGAOCLSDKROOT)\bin\aoc.exe "%(FullPath)" -o "$(IntDir)%(Filename)" -g -march=emulator [FileFlow] [Fpc] [FpRelax] [FastCompile] [IncCompile] [HighEffort] [DynamicProfiler] [KernelDefines] [OTHER]</CommandLineTemplate>
"
in the C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\FPGABuild.props file to solve the problem.
and run the local windows debugger.
after that problem occurs.
Severity |
Code |
Description |
Project |
File |
Line |
Suppression State |
Error |
|
OpenCL kernel compilation FAILED |
MyFirstOpenCLFPGAProgram |
C:\Users\colorful\Documents\AOCL\test\MyFirstOpenCLFPGAProgram\FPGA_BUILD_RULES |
1 |
|
Severity |
Code |
Description |
Project |
File |
Line |
Suppression State |
Error |
MSB3721 |
The command "C:\intelFPGA_pro\21.1\hld\bin\aoc.exe "C:\Users\colorful\Documents\AOCL\test\MyFirstOpenCLFPGAProgram\kernel.cl" -o "x64\sw_emu\kernel" -g -march=emulator -Dsize=1024 " exited with code 1. |
MyFirstOpenCLFPGAProgram |
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\FPGABuild.targets |
48 |
|
and the output :
Build started...
1>------ Build started: Project: MyFirstOpenCLFPGAProgram, Configuration: sw_emu x64 ------
1>kernel.cl
1>找不到 C:\Users\colorful\Documents\AOCL\test\MyFirstOpenCLFPGAProgram\*.aocx
1>已复制 1 个文件。
1>INTELFPGAOCLSDKROOT is set to "C:\intelFPGA_pro\21.1\hld". Using that.
1>Found a Quartus directory at "C:\intelFPGA_pro\21.1\quartus". Using that.
1>
1>Adding C:\intelFPGA_pro\21.1\hld\bin to PATH
1>Adding C:\intelFPGA_pro\21.1\hld\windows64\bin to PATH
1>Adding C:\intelFPGA_pro\21.1\hld\llvm\aocl-bin to PATH
1>Adding C:\intelFPGA_pro\21.1\hld\host\windows64\bin to PATH
1>Preprocessing: kernel.cl
1>FPGA_BUILD_RULES : warning : Use of debug symbols in the emulator flow on Windows is a beta feature.
1>FPGA_BUILD_RULES : error : OpenCL kernel compilation FAILED
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\FPGABuild.targets(48,5): error MSB3721: The command "C:\intelFPGA_pro\21.1\hld\bin\aoc.exe "C:\Users\colorful\Documents\AOCL\test\MyFirstOpenCLFPGAProgram\kernel.cl" -o "x64\sw_emu\kernel" -g -march=emulator -Dsize=1024 " exited with code 1.
1>Done building project "MyFirstOpenCLFPGAProgram.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
in my project file, an folder x64 was created and in that
ioc.log doesn't contains anything in x64\sw_emu\kernel.xxxx.temp.
but when I use either cmd line tool or the command line prompt in visual studio to run the command "C:\intelFPGA_pro\21.1\hld\bin\aoc.exe "C:\Users\colorful\Documents\AOCL\test\MyFirstOpenCLFPGAProgram\kernel.cl" -o "x64\sw_emu\kernel" -g -march=emulator -Dsize=1024 " it can compile and link successfully.
I googled and failed to find a solution. Also I tried reinstall the "OpenCL™ Tools for Visual Studio". The issue persists. please help to provide some advices. Thanks!
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page