-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating front-end code to accommodate Intel HLS and add library for … #206
base: main
Are you sure you want to change the base?
Conversation
…compiling HLS code to bitstream for Intel FPGA
…files that are used for compilation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing. It seems you're not using the included headers for now. I would suggest removing the intel_oneapi
folder. Also, some test cases using ihls
should be included. Please refer to this test file for details.
allo/backend/hls.py
Outdated
}, "Invalid mode" | ||
|
||
if project is not None: | ||
filename = f"{project}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filename is different from project
. For example, users can specify the project
as a nested folder test/out.prj
.
allo/backend/hls.py
Outdated
if mode == "fpga_emulator": | ||
result = subprocess.run( | ||
[ | ||
f" icpx -fintelfpga -DFPGA_EMULATOR .//{filename} -o {filename}.exe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use linux instruction. Also, how do you handle the non-emulator situations?
allo/backend/hls.py
Outdated
elif mode == "source_file_only": | ||
print( | ||
f"Generated Intel HLS source file kernel.cpp has been created successfully in your current directory under '{filename}' folder." | ||
) | ||
print( | ||
"mode has been set to source_file_only, the output will only be the souce intel HLS code" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this mode. Users can always access the source code from the built folder
allo/backend/hls.py
Outdated
if platform.lower() != "ihls": | ||
with open(f"{project}/host.cpp", "w", encoding="utf-8") as outfile: | ||
outfile.write(self.host_code) | ||
else: | ||
print("Platform is intel HLS; skipping generation of host.cpp.") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The host code is also set as empty. No need to skip the generation. Otherwise, you'd better change the name of kernel.cpp
as this one has already contained both host and device code.
allo/customize.py
Outdated
if target == "ihls": | ||
platform = "ihls" | ||
elif target == "vitis_hls": | ||
platform = "vitis_hls" | ||
else: | ||
platform = "vivado_hls" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"vivado_hls" if target == "vhls" else target
…compiling HLS code to bitstream for Intel FPGA
Description
Updated front-end code to accommodate Intel HLS and add library for compiling HLS code to bitstream for Intel FPGA
Problems
The Intel HLS option was not available for the user
Proposed Solutions
updated the code to allow users to choose a mode to output Intel HLS code in the command line, output source HLS as a file, or compile the HLS code to an Intel FPGA emulator .exe file. added library under harness/intel_oneapi to support DPC++ compilation for FPGA.