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

State of vuh2 #65

Open
federkamm opened this issue Feb 12, 2021 · 4 comments
Open

State of vuh2 #65

federkamm opened this issue Feb 12, 2021 · 4 comments

Comments

@federkamm
Copy link
Contributor

Hi, there is the vuh2 branch but it's not the default. There seem to be some design improvements in vuh2 but what is its current state? Can you recommend vuh2 for production code, or should I better stick to the master branch? (Btw., is there on purpose no vuh/vuh.hpp in vuh2?)

@Glavnokoman
Copy link
Owner

Glavnokoman commented Feb 14, 2021

Btw., is there on purpose no vuh/vuh.hpp in vuh2?

No. Its an oversight.

The vuh2 is mostly ready. It only lacks some documentation and minor polishing (like the missing library header you spotted here) to qualify for a release. I never used it out in the wild myself and not aware of anybody actively using it.

Feature-wise it is >= vuh1. With > being very marginal at the moment. There are also several small things that I fixed when rewriting (like the the UB in the shader loading code you noticed before).

The main idea behind the redesign was to allow the CUDA-like streams and easier pipeline reuse. The latter one is there. The streams are not, but they are relatively easy to add at this stage.

Another point is that if I ever come back to work on this project I would only be interested in vuh2 branch. But there is a fairly slim chance for that.

@federkamm
Copy link
Contributor Author

My vuh2 vuh.hpp currently looks like

#include <instance.hpp>
#include <device.hpp>
#include <buffer.hpp>
#include <kernel.hpp>
#include <algorithm.hpp>

did I miss anything? Shall I add such a main header in a pull request?

@Glavnokoman
Copy link
Owner

Even if you missed something this is a good start. Yes, please add this to vuh2 branch. Thanks! And if you are using it please let me know how it goes. I have a little more time these days so I could fix some sharp corners.

@federkamm
Copy link
Contributor Author

I did use vuh1 for performance (quality/runtime) comparison of image interpolation methods. I extracted one of the algorithms (the Lanczos method) in a small toy project and converted all but the main-file for actually running the code to vuh2 so far. Since then, I didn't find the time to finish the small example project.

My aim was to create a minimal example that shows all the "techniques" necessary for typical projects:

  • How to "compile" and "embedd" the SPIR-V opcode
  • How to use shared constants (#defines) in C- and GLSL-Code
  • How to transfer data over push constants and buffers
  • How to use specialization constants in GLSL-Code like template variables in C-Code
  • How to organize all files in a compiling (Makefile) Project (could be CMAKE as well)

The code for reading and writing images is quite "company specific", but it should be easy to replace it by PPM P6 (netbpm portable pixmap binary 8-bit rgb) specific code. I'll talk to my collegues, if I can publish the code here on GitHub. I think, that would be a nice addon to vuh2, since the examples and tutorials are not uptodate.

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

2 participants