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

Always emit weight expression. #1875

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

thorstenhater
Copy link
Contributor

@thorstenhater thorstenhater commented Apr 1, 2022

This addresses a problem occuring when a ionic (accumulated) quantity is
declared as WRITE, we have a block (any will do) that just reads it and
modcc emits SIMD code.

Example

NEURON {
  USEION na WRITE nai
}

INITIAL {
   LOCAL foo
   foo = nai
} << BOOM

BREAKPOINT {
  nai = 42
}

In this case modcc conservatively assumes that it will be written as well and emits

t_nai = S::fma(w_, nai, t_nai);

but 'forgets' to define w_. In scalar mode it's fine, since we just use weight[index]
without a temporary.

Solution

Be less fancy, just emit the SIMD code for

 w_ = weight[index];

equally conservatively, read always.

@boeschf boeschf self-assigned this Apr 26, 2022
@boeschf boeschf merged commit 0c014d4 into arbor-sim:master Apr 26, 2022
@thorstenhater thorstenhater deleted the bug/more-weights branch August 1, 2022 07:40
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.

2 participants