- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to run matrix_mul in fpga. Followed same procedure mentioned in Vector add, made build_fpga_hw.sh and run_fpga_hw.sh and then
qsub -l nodes=1:fpga_compile:ppn=2 -d . build_fpga_hw.sh
qsub -l nodes=1:fpga_runtime:arria10:ppn=2 -d . run_fpga_hw.sh
This warning came up..
:: WARNING: setvars.sh has already been run. Skipping re-execution.
To force a re-execution of setvars.sh, use the '--force' option.
Using '--force' can result in excessive use of your environment variables.
usage: source setvars.sh [--force] [--config=file] [--help] [...]
--force Force setvars.sh to re-run, doing so may overload environment.
--config=file Customize env vars using a setvars.sh configuration file.
--help Display this help message and exit.
... Additional args are passed to individual env/vars.sh scripts
and should follow this script's arguments.
Some POSIX shells do not accept command-line options. In that case, you can pass
command-line options via the SETVARS_ARGS environment variable. For example:
$ SETVARS_ARGS="ia32 --config=config.txt" ; export SETVARS_ARGS
$ . path/to/setvars.sh
The SETVARS_ARGS environment variable is cleared on exiting setvars.sh.
Can anyone please tell me where i am going wrong and what should be done..?
thanks for any help..
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please let us know which DevCloud you are using. Is it DevCloud for Edge/FPGA/OneAPI ?
Thanks,
Remya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is Devcloud for OneAPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please share with us a sample reproducer and the script files for build_fpga_hw.sh and run_fpga_hw.sh
Also, please confirm whether you are taking the sample from the repo: https://github.com/oneapi-src/oneAPI-samples/tree/master/DirectProgramming/DPC%2B%2B/DenseLinearAlgebra.
And note that all the samples given here are not designed for FPGA hardware. You can see under the pre-requisites>hardware section in the README file to know that.
Regards,
Remya Premdas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
make run_hw -f Makefile.fpga
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
make hw -f Makefile.fpga
These were used..
Yes.. Samples were taken from the mentioned link.. I understand all samples are not for FPGA hardware. So what should be done to run these atleast in Fpga emulator. I tried running with build_fpga_emu.sh and run_fpga_emu.sh as following
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
make fpga_emu -f Makefile.fpga
#!/bin/bash
source /opt/intel/inteloneapi/setvars.sh
make run_emu -f Makefile.fpga
Still nothing is happening.. I think i am missing something.. I need to know what all should be done for any program to run on Fpga in devcloud..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please follow the below steps to run matrix_mul in the FPGA emulator(in oneAPI DevCloud).
Step 1: Under matrix_multiplication folder:
- Create build_fpga_emu.sh
#!/bin/bash #PBS -l nodes=1:fpga_compile:ppn=2 #PBS -d . source /opt/intel/oneapi/setvars.sh > /dev/null 2>&1 echo echo start: $(date "+%y/%m/%d %H:%M:%S.%3N") echo make fpga_emu -f Makefile.fpga echo echo stop: $(date "+%y/%m/%d %H:%M:%S.%3N") echo
- Create run_fpga_emu.sh.
#!/bin/bash
#PBS -l nodes=1:fpga_compile:ppn=2
#PBS -d .
source /opt/intel/oneapi/setvars.sh > /dev/null 2>&1
echo
echo start: $(date "+%y/%m/%d %H:%M:%S.%3N")
echo
make run_emu -f Makefile.fpga
echo
echo end: $(date "+%y/%m/%d %H:%M:%S.%3N")
echo
- Create Makefile.fpga and paste the contents as below:
CXX := dpcpp
CXXFLAGS = -O2 -g -std=c++17
SRC := src/matrix_mul_dpcpp.cpp
.PHONY: fpga_emu run_emu clean
fpga_emu: matrix_mul_dpcpp.fpga_emu
report: matrix_mul_dpcpp.a
matrix_mul_dpcpp.fpga_emu: $(SRC)
$(CXX) $(CXXFLAGS) -fintelfpga $^ -o $@ -DFPGA_EMULATOR=1
a.o: $(SRC)
$(CXX) $(CXXFLAGS) -fintelfpga -c $^ -o $@ -DFPGA=1
run_emu: matrix_mul_dpcpp.fpga_emu
./matrix_mul_dpcpp.fpga_emu
dev.o: $(SRC)
$(CXX) $(CXXFLAGS) -fintelfpga -c $^ -o $@ -DFPGA=1
clean:
rm -rf *.o *.d *.out *.mon *.emu *.aocr *.aoco *.prj *.fpga_emu *.fpga_emu matrix_mul_dpcpp.fpga *.a
Step 2: Navigate to the src folder in matrix_mul
Step 3: Edit the matrix_mul_dpcpp.cpp file as below:
- Add in the header :
#include <sycl/ext/intel/fpga_extensions.hpp>
- Add the below under main() :
#if FPGA_EMULATOR
// DPC++ extension: FPGA emulator selector on systems without FPGA card.
ext::intel::fpga_emulator_selector d_selector;
#elif FPGA
// DPC++ extension: FPGA selector on systems with FPGA card.
ext::intel::fpga_selector d_selector;
#else
// The default device selector will select the most performant device.
default_selector d_selector;
#endif
After editing and creating the above files run the below commands:
qsub -l nodes=1:fpga_compile:ppn=2 -d . build_fpga_emu.sh
qsub -l nodes=1:fpga_compile:ppn=2 -d . run_fpga_emu.sh
The result will be generated. Please try and let us know if you need any clarifications.
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues. Thank you!
Regards,
Remya Premdas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tried all these steps
Included Makefile.fpga
I think Fpga is not getting detected. FPGA_Emulator and FPGA are in red color when .cpp file is edited.
So after build
and after run nothing is happening
No output.. No error..
Is there anything else to do initially before all these steps..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sharing the screenshot of the matrix_mul_dpcpp.cpp file, where you need to make the changes.
Are you saying about the highlighted part in the code? If yes, the red highlight shouldn't be a problem.
Make sure the spaces and tabs are given correctly in all the files.
If issue still exist, please send a screenshot/content of the error files.
Regards,
Remya Premdas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please send the screenshot of matrix_mul_dpcpp.cpp you mentioned as I am not able to see any image.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks a lot! It worked.. I guess some issue was there inside my Makefile.fpga it is working in Fpga emulator now.
What change should I do to work in Fpga hardware?
I tried generating run_fpga_hw.sh and build_fpga_hw.sh.. and then tried building. But the warning that I earlier mentioned still persist. So changes should be done in Makefile.fpga ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on this internally with the team. We will get back to you.
Regards,
Remya Premdas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Laxmis,
Thank you for posting in Intel community forum and hope all is well.
If I understand the situation correctly, you are trying to vector add example to compile and run the Matrix Multiply Sample.
Seems that you have successfully run the emulator with some changes on the MakeFile.
As mention previously the Matrix Multiply are not design for FPGA, hence running in hardware would defeat the purposes of understand oneapi on FPGA.
Hence would recommend to follow the similar project below to use the cmake to generate the make which will allow emulation and also hardware execute.
Hope that clarify.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Laxmis,
Greetings, just checking in to see if there is any further doubts in regards to this matter.
Hope we have clarify your doubts.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As we do not receive any response from you on the previous answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page