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

[Bug] fix multi-threading issue in lstm layer #2935

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

baek2sm
Copy link
Contributor

@baek2sm baek2sm commented Feb 11, 2025

In LSTM, when the multi-thread option is enabled, either only the d_bias_h (hidden) value is calculated or both d_bias_ih (input-hidden) and d_bias_hh (hidden-hidden) values are calculated, depending on whether the integrate_bias option is set. However, there was an error because all three values were being attempted to be calculated at the same time. Therefore, this patch adds a conditional statement to fix this bug.

Self evaluation:

Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong [email protected]

In LSTM, when the multi-thread option is enabled, either only the d_bias_h (hidden) value is calculated or both d_bias_ih (input-hidden) and d_bias_hh (hidden-hidden) values are calculated, depending on whether the integrate_bias option is set. However, there was an error because all three values were being attempted to be calculated at the same time. Therefore, this patch adds a conditional statement to fix this bug.

**Self evaluation:**

Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Seungbaek Hong <[email protected]>
@baek2sm baek2sm changed the title [Bug] fix multithreading issue in lstm layer [Bug] fix multi-threading issue in lstm layer Feb 11, 2025
Copy link
Collaborator

@jijoongmoon jijoongmoon left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@EunjuYang EunjuYang left a comment

Choose a reason for hiding this comment

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

Nice catch! 👍

@jijoongmoon jijoongmoon merged commit 5a96159 into nnstreamer:main Feb 12, 2025
21 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants