Skip to content

Commit

Permalink
Fix issue that argument buffer has limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Nov 15, 2024
1 parent 7832cde commit dbdf28d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/nnc/cmd/ew/mps/ccv_nnc_ew_mps.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ static int _ccv_nnc_ewsum_forw(const ccv_nnc_cmd_t cmd, const ccv_nnc_hint_t hin
fallback_reason = "Disabled.";
}

if (use_mfa) {
if (input_size > 8) // Should be 31 or 16 maximum. We just be safe here.
{
use_mfa = false;
fallback_reason = "Too many argument buffers.";
}
}

if (use_mfa) {
for (z = 0; z < input_size; z++)
{
Expand Down

0 comments on commit dbdf28d

Please sign in to comment.