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

Workspace is not a singleton #40

Open
xyzsam opened this issue Aug 9, 2020 · 1 comment
Open

Workspace is not a singleton #40

xyzsam opened this issue Aug 9, 2020 · 1 comment

Comments

@xyzsam
Copy link
Member

xyzsam commented Aug 9, 2020

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).

@xyzsam
Copy link
Member Author

xyzsam commented Aug 9, 2020

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.

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