Skip to content
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

[WIP] MultiThreshold by Binary Search #687

Closed
wants to merge 121 commits into from

Conversation

fionnodonohoe-xlnx
Copy link
Contributor

Creating a draft pull request to get a head start on code reviewing - some initial feedback on the structuring of the new class would be helpful, also if the methods chosen are acceptable, etc.

Already, I noticed the banners need to be updated... and there's a method that I can probably snip - get_template_param_values().

Thomas' HDL commits can be ignored from code reviewing I think.

Copy link
Contributor Author

@fionnodonohoe-xlnx fionnodonohoe-xlnx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When integrating the parameters to this block, this is what worked with the FINN compiler:
parameter C_BITS = C < 2 ? 1 : $clog2(C),
int BIAS = $BIAS$,
parameter O_BITS = BIAS <= 0 ? $clog2(2**N-BIAS) : 1+$clog2(BIAS >= 2**(N-1) ? BIAS : 2**N-BIAS)

preusser and others added 25 commits November 17, 2022 09:20
…sion, no HLS support for this class required).

The following functions have been removed when compared to the original Thresholding_Batch class:
    - get_weightstream_width_padded()
        needed for cppsim
    - get_ap_int_max_w()
        needed for cppsim
    - get_template_param_values()
        needed for cppsim
    - get_hls_compatible_threshold_tensor()
        needed for cppsim/hlslib
    - get_verilog_top_module_intf_names()
        already have TOP verilog module interface names I think
    - get_op_and_param_counts()
        not used anywhere
    - ipgen_extra_directives()
        needed for cppsim/hlslib

Signed-off-by: Fionn O'Donohoe <[email protected]>
…reshold_binary_search class

Signed-off-by: Fionn O'Donohoe <[email protected]>
fionnodonohoe-xlnx and others added 9 commits March 31, 2023 10:57
Signed-off-by: Fionn O'Donohoe <[email protected]>
…nel fold factor is present

In the case where channel fold is not present (i.e. CF is 0), we saw incorrect threshold address programming.
Without this commit and when no channel folding is present, this if statement is always stepped through and
was damaging LSBs of the Addr signal, causing incorrect threshold address programming for a PE core.

Although the logic in the if statement looks correct (i.e. programming 0 bits (clog2(CF) => 0)) and should not
harm the Addr signal, it's best to avoid stepping through a case that does not exist (i.e., there is no channel
folding and each channel has its own PE; therefore no extra bits needed to program multiple channel thresholds
into a single PE core).

Signed-off-by: Fionn O'Donohoe <[email protected]>
commit 6582235 on dev moved all custom_ops
to be compatible with qonnx 0.2.0

Signed-off-by: Fionn O'Donohoe <[email protected]>
@preusser preusser changed the title Feature/thresholding [WIP] MultiThreshold by Binary Search Jun 27, 2023
@auphelia auphelia removed the request for review from maltanar July 10, 2023 09:28
…tion masking.
…pped to BRAM or URAM.
…djusting to established naming in FINN.
azizb-xlnx pushed a commit that referenced this pull request Jan 15, 2024
Applying the original BTS pull request #687 by fionnodonohoe-xlnx to add updates and bug fixes
@auphelia auphelia closed this Jul 8, 2024
@auphelia auphelia removed request for preusser and auphelia July 8, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants