Skip to content

Conversation

@marchioa
Copy link

In generic platform, GEMM was not correctly hoisting the bias tensor when required.
To solve the issue, bias hoisting has been moved from MatMulParser.parseNodeCtxt to GEMMParser.parseNode.
Moreover, the default value of noBiasHoisting flag in GenericGEMMParser has been changed from True to False to be compliant with the template.

Added

  • testFloatGEMMnobias

Changed

  • Generic\Parser.py file (MatMulParser, GEMMParser, and GenericGEMMParser)

Fixed

  • fix bias hoisting in GEMM with no bias

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.
  4. The CHANGELOG.md file has been updated.
  5. If the docker was modified, change back its link after review.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Streamlined GEMM operation parser initialization and bias handling logic.
    • Updated default bias hoisting behavior for improved operation compatibility.
    • Removed redundant synthetic tensor generation, reducing memory overhead and improving processing efficiency.

Walkthrough

The pull request refactors GEMM parser initialization to delegate bias-hoisting handling to the base class, removes synthetic C tensor creation when bias hoisting is disabled, and changes the default bias-hoisting behavior in GenericGEMMParser from enabled to disabled.

Changes

Cohort / File(s) Summary
GEMM Parser Refactoring
Deeploy/Targets/Generic/Parsers.py
Modified GEMMParser constructor to delegate bias-hoisting initialization to base class via super().__init__(noBiasHoisting), removing explicit self.noBiasHoisting assignment. Removed code path that synthesized C bias tensors and mock bias matrices in parseNodeCtxt when bias hoisting was disabled. Changed GenericGEMMParser default noBiasHoisting from True to False.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "fix bug in Generic GEMM with no bias" is directly related to the main change in this changeset. The PR objectives and raw summary confirm that the primary change is fixing a bug in the Generic platform's GEMM implementation where bias hoisting was not working correctly. The title is concise and specific, clearly indicating both the area affected (Generic GEMM) and the nature of the fix (bias-related). A teammate scanning the repository history would understand that this PR addresses a GEMM bias hoisting issue.
Description Check ✅ Passed The pull request description is clearly related to the changeset and provides meaningful information about the changes. It explains the problem ("GEMM was not correctly hoisting the bias tensor when required"), describes the solution ("bias hoisting has been moved from MatMulParser.parseNodeCtxt to GEMMParser.parseNode" and "default value of noBiasHoisting flag changed from True to False"), and lists what was added, changed, and fixed. The description is specific and directly reflects the modifications in the Deeploy/Targets/Generic/Parsers.py file documented in the raw summary.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15c4a23 and 0641fc9.

📒 Files selected for processing (1)
  • Deeploy/Targets/Generic/Parsers.py (3 hunks)
🔇 Additional comments (2)
Deeploy/Targets/Generic/Parsers.py (2)

1738-1739: LGTM: Initialization now delegates to base class.

The initialization correctly passes noBiasHoisting to MatMulParser.__init__, which stores it as self.noBiasHoisting. This is cleaner than the previous pattern.


2269-2269: I need to search the codebase more thoroughly to understand the impact of this change.Based on the evidence gathered, I can now generate the rewritten review comment. The key finding is that the test testFloatGEMMnobias mentioned in the PR description does NOT exist in the codebase, and the default parameter change is a BREAKING CHANGE affecting two platforms.


The PR claims to add testFloatGEMMnobias, but this test does not exist in the codebase. Verify test coverage before merging.

The change to noBiasHoisting default from True to False is a breaking behavioral change affecting GEMM operations on two platforms:

  • Deeploy/Targets/Generic/Platform.py:41 (Generic platform)
  • Deeploy/Targets/MemPool/Platform.py:74 (MemPool platform)

Both instantiations rely on the default parameter, so they will now enable bias hoisting by default instead of disabling it.

Required actions:

  1. Confirm whether the test mentioned in the PR description (testFloatGEMMnobias) was intended to be added as part of this PR
  2. Ensure existing GEMM test suite passes with the new default behavior
  3. Document the breaking change or update code to explicitly pass noBiasHoisting=True to maintain backward compatibility

@Xeratec Xeratec added the Bug Something isn't working label Oct 23, 2025
@Xeratec Xeratec added this to Deeploy Oct 23, 2025
@Xeratec Xeratec moved this to Need Reviewer in Deeploy Oct 23, 2025
@Xeratec Xeratec added this to the Release 0.2.1 milestone Oct 23, 2025
@Xeratec Xeratec moved this from Need Reviewer to In review in Deeploy Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants