-
Notifications
You must be signed in to change notification settings - Fork 545
Vitis accelerator #991
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
Open
axiotisk
wants to merge
80
commits into
fastmachinelearning:main
Choose a base branch
from
axiotisk:vitis_accelerator_dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Vitis accelerator #991
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
b7602c3
Initial version of VitisAccelerator backend:
axiotisk 6f596d2
fixing discrepancies post-merge
alex-yang-upenn 448f342
reverting unnecessary changes
alex-yang-upenn bc7d5b0
final adjustments
alex-yang-upenn f8d74cf
minor fixes and testing notebook
alex-yang-upenn f225845
minor fixes
alex-yang-upenn b03e603
Updated host code and added more board support
alex-yang-upenn 3d04799
cleaned up c++ code generation and added build functionality
alex-yang-upenn 2e732d0
Added ability to use numpy array as I/O + CNN fixes
alex-yang-upenn a42816a
Optimizations for reading dat + copytree bugfix
alex-yang-upenn 5d1c457
updated testing notebook
alex-yang-upenn ec58521
Cleaned-up host code + improved .dat generation
alex-yang-upenn 6a5626c
fixed testing notebook
alex-yang-upenn 08fbbe2
build() signature alignment + xcl update + write_host() overwrite
alex-yang-upenn 402016f
Fix VCK5000 part definition
2dcad61
Documentation draft
axiotisk c657a48
Default directives + HLS Clock control
alex-yang-upenn a00f7a2
implementing hw quant option
alex-yang-upenn 2be1e4f
Update makefile
2a0a52e
Fix vck5000 detection in makefile
76e3bc7
Remove messageDb from config file now that it is handled in makefile
ee47d33
build dir name + versal packaging + ultraclean
alex-yang-upenn 950c0ed
minor fixes
alex-yang-upenn 376c982
Fix Makefile template and Makefile generation
70c092e
Python black formating
b89ee78
Apply pre-commit suggested changes (formating)
ab9fc69
Update manifest and remove developpement requirement.txt
7137cc0
Update documentation.
90aee77
Documentation update
alex-yang-upenn 1dba672
fixing build() behavior + documentation
alex-yang-upenn 884aa3f
Whitespace cleanup
7fe12ed
Fix missing parameter in create_initial_config() (due to rebase)
aabea2d
Remove duplication in documentation
axiotisk d5e7619
Fix pre-commit
axiotisk 4936c55
fixing spacing in generated code
alex-yang-upenn 7c288bc
Fix typo
7a27c89
Update bulild():
cb98a48
Add a target parameter to hardware_predict()
ac5cd60
Update documentation.
737d750
Setup emu in Makefile and edit tb_input_features in host
axiotisk e340f79
Backend and Makefile fixes for emulation
axiotisk 9b57d85
Update host code for clarity & better data handling
alex-yang-upenn 83dd02b
Allowing flexibility with platforms
alex-yang-upenn 98a40da
VitisAccelerator Host code refactor:
dc4df5c
fix(vitis_backend.py): command variable not initialized on hardware_p…
Djokzer 8a43364
feat[shared_library]: started a predict function in host code
Djokzer 2313999
feat[shared_library]: Can load test data from python to the host code
Djokzer cc919c7
feat[shared_library]: shared library works in python but not with jup…
Djokzer f3ca189
feat[hardware_predict]: add shared lib way in the hardware predict fu…
Djokzer e219e21
fix[hardware_predict]: Check if shared lib exists
Djokzer 740396b
fix[hardware_predict]: Fixed hardcoded output directory
Djokzer d3529d1
feat[hardware_predict] : add debug print
Djokzer ca92022
fix[debug]: fixed a print error
Djokzer f8961bc
fix[shared_library] : Print on a file, because print don't work with …
Djokzer c688a5d
fix[hardware_predict]: Force x array to float64
Djokzer e38ad31
Fix[hardware_predict]: Fixed working directory changing
Djokzer 638bc57
feat[shared_lib]: small opti for input buffer to vector
Djokzer 06bce48
fix[hardware_predict]: file based makefile, fix make run
Djokzer 25cc3cc
feat[platforms]: more user friendly platform selection
Djokzer d490466
fix[platforms] : fixed typo on print
Djokzer 818d04f
fix[hardware_predict]: Fixed rebuild when hardware predict, changed d…
Djokzer 4a30e67
fix[hardware_predict]: fixed x input for file based
Djokzer 0d5d61c
Improves commande line help message
0d4b407
Enable dynamic batch size for io_stream wrapper
d74c3b7
Enable dynmamic batch size for io_parallel
1e59bb5
fix[io_parralel]: fixed dynamic batchsize for io_parallel
Djokzer 45b6c60
fix[io_parallel]: override nnet utils with vitis backend
Djokzer 5eb0247
docs[vitis_accel]: updated docs
Djokzer d0496d6
docs[vitis_accel]: updated example
Djokzer 6cff973
docs[vitis_accel]: add platform selection
Djokzer b964d59
docs[vitis_accel]: add note about io_type
Djokzer abf0669
docs[vitis_accel]: formatting and typo fix
Djokzer 50496be
Update doc
bedef86
Fix pre-commit formating
b0979dc
fix[feature_check]: align warning with vitis backend
Djokzer 5d5854e
Make HGQ aware of VitisAccelerator backend.
c059020
fix[vitis_accel_writer]: fix issue with input shape following rebase
Glegouic 1dbca20
fix[da4ml]: made da4ml aware of VitisAccelerator backend
Glegouic 7100210
fix[io_stream]: fix insufficient reading of output stream
Glegouic 6ab94d4
refactor[vitis_accelerator_writer] : cleaned up override function call
Djokzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| from hls4ml.model.optimizer import OptimizerPass | ||
|
|
||
|
|
||
| class ValidateConvImplementation(OptimizerPass): | ||
| def match(self, node): | ||
| return 'Conv' in node.class_name | ||
|
|
||
| def transform(self, model, node): | ||
| if node.get_attr('implementation', 'linebuffer') == 'encoded': | ||
| print( | ||
| f'WARNING: "Encoded" implementation in "{node.name}" ({node.class_name}) is not supported in Vitis backend. ' | ||
| 'Switching to "LineBuffer" implementation.' | ||
| ) | ||
| node.set_attr('implementation', 'linebuffer') | ||
|
|
||
|
|
||
| class ValidateStrategy(OptimizerPass): | ||
| _resource_layer_cls = ['Conv1D', 'Conv2D', 'Dense'] | ||
|
|
||
| def match(self, node): | ||
| is_resource_layer = len([layer_cls for layer_cls in self._resource_layer_cls if layer_cls in node.class_name]) > 0 | ||
| is_resource_strategy = node.model.config.is_resource_strategy(node) | ||
|
|
||
| return is_resource_layer and is_resource_strategy | ||
|
|
||
| def transform(self, model, node): | ||
| n_in, _ = model.config.backend.get_layer_mult_size(node) | ||
| rf = node.get_attr('reuse_factor') | ||
| if rf > n_in and rf % n_in > 0: | ||
| print( | ||
| f'WARNING: "Resource" strategy in "{node.name}" ({node.class_name}) may have suboptimal QoR in Vitis ' | ||
| 'backend due to use of "urem" cores in Vitis HLS <= 2022.1.\n' | ||
| 'Consider using a different ReuseFactor or switching to "Latency" strategy if using older versions ' | ||
| 'of Vitis HLS.' | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "alveo-u55c": { | ||
| "board_type": "alveo", | ||
| "part": "xcu55c-fsvh2892-2L-e", | ||
| "platform": ["xilinx_u55c_gen3x16_xdma_3_202210_1"], | ||
| "memory": {"type": "hbm", "channels": 32, "capacity": 16} | ||
| }, | ||
| "alveo-u50": { | ||
| "board_type": "alveo", | ||
| "part": "xcu50-fsvh2104-2-e", | ||
| "platform": ["xilinx_u50_gen3x16_xdma_5_202210_1"], | ||
| "memory": {"type": "hbm", "channels": 32, "capacity": 8} | ||
| }, | ||
| "alveo-u250": { | ||
| "board_type": "alveo", | ||
| "part": "xcu250-figd2104-2L-e", | ||
| "platform": ["xilinx_u250_xdma_201830_2"], | ||
| "memory": {"type": "ddr", "channels": 4, "capacity": 64} | ||
| }, | ||
| "vck5000": { | ||
| "board_type": "versal", | ||
| "part": "xcvc1902-vsvd1760-2MP-e-S", | ||
| "platform": ["xilinx_vck5000_gen4x8_qdma_2_202220_1"], | ||
| "memory":{"type": "ddr", "channels": 3, "capacity": 12} | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this still an issue? For the regular Vitis backend Resource now works fine.
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 pointing this out! I checked and the regular Vitis backend still has this warning in its feature_check. To keep consistency between backends, I just updated the code here to replicate the current Vitis behavior.