IPlugin: what counts as workspace size when implementing getWorkspaceSize()?

I’m quite new to this area, so please bear with me if this sounds trivial.

I’ve gone through the samplePlugin FC layer example and the documentation. I’m wondering what to return when defining getWorkspaceSize() for IPlugin.

The documentation basically says memory space in addition to input and output tensors. Also it is mentioned that it is shared among layers.

Could someone please elaborate on this and provide a simple example or use case and how to choose the appropriate value for a given IPlugin?

Thank you.

Many examples I found and also my code uses:

virtual size_t getWorkspaceSize(int) const override { return 0; }

I implemented flatten layer and slice layer by this and it works fine