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

Winit example slow on wsl #562

Open
yashs662 opened this issue Apr 29, 2024 · 4 comments
Open

Winit example slow on wsl #562

yashs662 opened this issue Apr 29, 2024 · 4 comments
Labels
question Further information is requested

Comments

@yashs662
Copy link

The example only gets around 4-5 FPS on WSL but gets around 1K+ on Windows, any way I can fix this?

@simbleau
Copy link
Member

My first guess is that GPU passthrough either isn't available (CPU fall-back?) or is throttled.

Please be more specific and explain how you're running it, though.

@simbleau simbleau added the question Further information is requested label Apr 30, 2024
@yashs662
Copy link
Author

yashs662 commented May 1, 2024

I thought the same! For some reason it worked before yesterday, I restarted my PC today and got this. I suspect something is wrong with my wsl instance (not sure - I haven't made any changes since yesterday). For context other tasks requiring the GPU to work are fine e.g. running machine learning models with PyTorch, nvidia-smi output is fine, nvcc is there

➜  vello git:(main) cargo run -p with_winit --release
    Finished release [optimized] target(s) in 0.78s
     Running `target/release/with_winit_bin`
No test files have been downloaded. Consider downloading some using the subcommand:
Download SVG files for testing. By default, downloads a set of files from wikipedia

Usage: cargo run -p with_winit -- download [OPTIONS] [DOWNLOADS]...

Arguments:
  [DOWNLOADS]...  Set of files to download. Use `name@url` format to specify a file prefix

Options:
      --directory <DIRECTORY>    Directory to download the files into [default: /home/yash/programming/vello/examples/assets/downloads]
      --auto                     Whether to automatically install the default set of files
      --size-limit <SIZE_LIMIT>  The size limit for each individual file (ignored if the default files are downloaded) [default: "10 MB"]
  -h, --help                     Print help
[2024-05-01T02:22:01.851Z ERROR sctk_adwaita::config] XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
Initialising in parallel using 10 threads
Parsed svg Ghostscript_Tiger in 1.880476ms
Encoded svg Ghostscript_Tiger in 80.569µs
Io error: Broken pipe (os error 32)
Io error: Broken pipe (os error 32)
thread 'main' panicked at examples/with_winit/src/lib.rs:638:10:
run to completion: ExitFailure(1)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Do you have any idea what could have changed?

@simbleau
Copy link
Member

simbleau commented May 1, 2024

No idea! I also don't use Linux.

Maybe @armansito or @DJMcNab would. Looks like, although perhaps unrelated, some strange parsing of the shaders.

Particularly standing out:

XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
Initialising in parallel using 10 threads

@armansito
Copy link
Collaborator

armansito commented May 1, 2024

No idea! I also don't use Linux.

Maybe @armansito or @DJMcNab would. Looks like, although perhaps unrelated, some strange parsing of the shaders.

Particularly standing out:

XDG Settings Portal did not return response in time: timeout: 100ms, key: color-scheme
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
#endif directives don't take an argument. `// msaa` will not be in output (line 717)
#endif directives don't take an argument. `// full` will not be in output (line 1085)
Initialising in parallel using 10 threads

Those messages (about the #endif directives) are harmless; the WGSL preprocessor doesn't gracefully handle inline comments that follow an #endif directive and print out this error message. I'll send a PR to suppress those so they don't spam the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants