Skip to content

Conversation

@theaniketgiri
Copy link

  • Add new CLI flag to list available GPU adapters and exit
  • Refactor gpu_context.rs to eliminate code duplication
  • Extract create_context_builder() helper function
  • Add documentation for public functions
  • Define ADAPTER_ENV_VAR constant for environment variable name
  • Remove verbose adapter logging on every startup

Resolves TODO comments about adding CLI flag for adapter listing.

- Add new CLI flag to list available GPU adapters and exit
- Refactor gpu_context.rs to eliminate code duplication
- Extract create_context_builder() helper function
- Add documentation for public functions
- Define ADAPTER_ENV_VAR constant for environment variable name
- Remove verbose adapter logging on every startup

Resolves TODO comments about adding CLI flag for adapter listing.
let wgpu_context = futures::executor::block_on(gpu_context::create_wgpu_context());
if cli.list_gpu_adapters {
futures::executor::block_on(gpu_context::list_adapters());
exit(0);
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer a return instead of an exit() since the exit does not do any cleanup

Copy link
Author

Choose a reason for hiding this comment

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

Good catch, thanks! Changed to return so the lock and any other initialized resources get properly cleaned up.

@timon-schelling
Copy link
Member

Code looks good, I will merge this before the release, but currently (during testing) it's helpful to have the adapter info from all testers.

@theaniketgiri
Copy link
Author

Code looks good, I will merge this before the release, but currently (during testing) it's helpful to have the adapter info from all testers.

Thanks for the review, @timon-schelling ! Glad to hear the code looks good.

I'm on holiday break and have some free time to contribute more to Graphite. I've really enjoyed working on this and would love to help with other areas of the project.

Are there any priority features or issues you'd like help with? I'm comfortable with Rust and happy to tackle anything from the backlog. Also open to discussing any new feature ideas if there are gaps you'd like filled.

Let me know what would be most valuable!

@timon-schelling
Copy link
Member

Are you on our discord? You can @ me there, in development or desktop-app channels.

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.

3 participants