smaug
smaug copied to clipboard
Workspace is not a singleton
Workspace is the global container of all operators and tensors in the network, and we generally just assume that there is only one. Should we enforce this property by making Workspace a singleton? I am not sure if it will impact the unit tests (since there may be a good reason to have multiple Workspaces in tests).
One additional benefit of a singleton Workspace is that we can get rid of having every Operator take a Workspace argument. We can just use Workspace::Get() or some other similar API.