You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GRU larger than a certain size appears to cause a segmentation fault. This is not specific to the backend, the result has been replicated with all backends.
Thanks for the report! Do you have any more information about the root cause of the seg fault? My guess is that it's just a stack overflow, since the model might be too large to be allocated on the stack.
Hi! Yes, I think it's due to the fact that weights are being stored on the stack. I don't know how practical it is to reorg some of the code so that layer weights are stored on the heap using a vector or etc?
It would be possible to store the layer weights on the heap, but I'd rather not do that in the "compile-time" implementations of the layers, for performance reasons.
I would suggest trying one of two options:
Using the "run-time" API rather than the compile-time API. With the run-time API, the weights are stored on the heap.
Store the entire model on the heap, e.g. auto model = std::make_unique<ModelType>();.
A GRU larger than a certain size appears to cause a segmentation fault. This is not specific to the backend, the result has been replicated with all backends.
Minimal Replication
Build Environment
Macbook Pro with M2 Pro Processor. CMakeLists.txt is as follows:
The text was updated successfully, but these errors were encountered: