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

Can configure wgpu max tasks #603

Merged
merged 3 commits into from
Aug 23, 2023
Merged

Can configure wgpu max tasks #603

merged 3 commits into from
Aug 23, 2023

Conversation

nathanielsimard
Copy link
Member

No description provided.

@nathanielsimard nathanielsimard mentioned this pull request Aug 7, 2023
Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this param passible instead of using environment param? We have a few options if you still want to use it as an env param. We could make it static and use it by builder through env param.

The main reason I am bringing this up is to make no_std compatible and easy build for wasm.

@nathanielsimard
Copy link
Member Author

We could use an AtomicUsize to do the same thing. I just think not having to recompile the project and play with an environment variable is better for that case. We could provide both ways of modifying this setting. @antimora, what do you think? Do you have any other propositions?

@antimora
Copy link
Collaborator

antimora commented Aug 8, 2023

We could use an AtomicUsize to accomplish the same thing. I just think that not having to recompile the project and play with an environment variable is more advantageous in this case. We could offer both ways of modifying this setting. @antimora, what do you think? Do you have any other suggestions?

I'm okay with not requiring compilation; it's simply the manner in which the value is passed that concerns me. It's analogous to passing a global variable but worse. Using global variables in the middle of code will inherit all associated problems (testing, debugging, etc).

It's acceptable if we use an environment variable from the place where we construct the server. It provides an opportunity to override the value from other sources. Perhaps we can even add a conditional feature flag for no_std compilation.

However, I acknowledge that your function interface will change for this parameter (and any downstream interfaces).

Maybe this is a good opportunity to think about some config structure for wgpu, as I am seeing many hardcoded values that might go through similar adjustments. If your interface already takes a config struct, you won't have to modify the function interfaces. What do you think?

@nathanielsimard nathanielsimard merged commit d18d1b0 into main Aug 23, 2023
3 checks passed
@nathanielsimard nathanielsimard deleted the wgpu-max-tasks branch August 23, 2023 16:20
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

Successfully merging this pull request may close these issues.

2 participants