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

GPU weird bug in NewState #234

Open
rcoreilly opened this issue Jun 2, 2023 · 1 comment
Open

GPU weird bug in NewState #234

rcoreilly opened this issue Jun 2, 2023 · 1 comment

Comments

@rcoreilly
Copy link
Member

There is a very strange bug in GPU NewState:

layerparams.go:

// NewStateNeuron handles all initialization at start of new input pattern.
// Should already have presented the external input to the network at this point.
func (ly *LayerParams) NewStateNeuron(ctx *Context, ni, di uint32, vals *LayerVals) {
	SetNrnV(ctx, ni, di, BurstPrv, NrnV(ctx, ni, di, Burst))
	SetNrnV(ctx, ni, di, SpkPrv, NrnV(ctx, ni, di, CaSpkD))

This works fine in CPU mode, and is clearly free of an actual coding error, but the GPU version returns 0 for those NrnV access calls of the Burst and CaSpkD variables. It sets the new values just fine, including setting Burst etc, but reading these values just plain fails for reasons that are entirely unclear.

Originally this code was being called from a Pool level dispatch, but changing it to neuron-level did not fix the problem (but is more performant).

There is some kind of read cache breakage here that we need to figure out. Meanwhile, using a temporary solution of just doing the NewState on CPU -- not a big deal performance-wise.

@rcoreilly
Copy link
Member Author

Important: when switching back to NewState on GPU, need to update to use proper logic for NewStateLayerActAvg

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

No branches or pull requests

1 participant