-
Notifications
You must be signed in to change notification settings - Fork 30
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
How to actually run wgpu on CI? #47
Comments
OpenGL works on CI, so I think vulkan etc should too... We can install drivers if need be? |
Isn't OpenGL on CI usually a software driver? So maybe ... something like https://github.com/kazan-3d/kazan? |
Yeah, that is an option. But I also think that Azure Pipelines agents do have Intel Graphics available. We've used https://marketplace.visualstudio.com/items?itemName=ms-autotest.screen-resolution-utility-task in the past to run selenium tests for a certain WebGL based application you are very familiar with. ;) It enables a screen session. I'm not sure if that would help us here, but at least it's evidence that OpenGL works on Azure Pipelines CI machines. Also; we didn't need to install a software driver there, but then again, maybe it was preinstalled... hmm |
I've looked through gfx-rs/wgpu and they don't run this type of tests on Travis CI either. Not sure if this is feasible at all |
We could indeed try to build kazan and use it to run tests on CI. But that would only work on Linux since it is Vulkan, I think? |
AFAIK it can run on any platform on which it can be compiled. Windows 10 also includes Vulkan, I believe. However, I don't know how |
With some helpful explanations from @kvark I think we've cracked this one: gfx-rs/wgpu#644 Just need to compile swiftshader (and point wgpu-native to it). |
Sadly I'm not able to get swiftshader to compile: it's poorly documented which versions and configurations of build toolchains should be used and there are no git tags of "releases" that are supposed to compile successfully either. I don't have time to reverse engineer all that info. I noticed that the latest version of OSMesa actually has a Vulkan API as well so I will see if I can get that to work instead! cc @kvark |
@Korijn it's a bit sad state of things that Swiftshader doesn't feature any binary releases at all. They have a Vulkan ICD interface defined already, so they could do backwards-compatible releases for everyone to enjoy. Perhaps, you could file a bug to https://issuetracker.google.com/issues?q=componentid:408190 ? |
There is code to build Vulkan mesa, and apparently Doom Eternal can run on it, so I'm hopeful we can use it for our purposes here as well: https://github.com/mesa3d/mesa/tree/master/.gitlab-ci But it's a little hard to extract the core steps to make a build ourselves... |
I wonder what this Vulkan mesa is? The only software implementation I thought existed was SwiftShader. |
Looks like they're using lavapipe now: Wonder if that could be an easy solution for us, too! Alternatively, it might be time to try DirectX 12 again |
It would be very nice if we could run tests with wgpu on CI, also in pygfx, to better validate our code. Actually, I would be a bit disappointing if we can't.
Considerations
GPU vs integrated vs software
I briefly looked into GPU instances (e.g. at Scaleway), but these are aimed at really high performance work and therefore really expensive. Strictly speaking we don't need a GPU, as long as Vulkan/Metal has something to run on (Intel graphics or software), but I'm not sure how that'd work in a VM.
Possible approaches (generic)
Vulkan on CI
One way for this to work is Vulkan/Metal to be available on the CI machines, which does not appear to be the case by default (see #45), as could have been expected. There are some posts suggestion that other projects setup their own local server via e.g. Gitlab runner.
DirextX
DX11/DX12 is available on GH Actions, but it is prone to crashing (for our examples).
WGPU
In theory there could be a software WGPU implementation that does not rely on hardware.
Relevant links
last edit: june 2021
The text was updated successfully, but these errors were encountered: