spacemeshos / gpu-post

Spacemesh proof of space time gpu optimized setup
GNU General Public License v3.0
29 stars 9 forks source link

Phase3 1 256 bits #20

Closed AndrewAR2 closed 3 years ago

AndrewAR2 commented 4 years ago

The supported label length has been increased to 256 bits.

moshababo commented 4 years ago

Hi @AndrewAR2, thanks for the PR.

  1. The test code doesn't work - looks like it's still in WIP state. I briefly fixed it (removed the #if 0 clauses, changed the const values, etc.), but it still doesn't seem to pass. Please update when the test code is resolved and we can start use it.

  2. My Go client testing are failing. branch: https://github.com/spacemeshos/post/commits/gpu_tests. In the latest commit (https://github.com/spacemeshos/post/commit/167be024be24a3358da147c05918896726daa9a9) the lib artifacts were updated to this brach, and some tests were adjusted. TestScryptPositions and TestScryptPositions_HashLenBits are the important ones, and they are failing. Please let us know if you want guidance regarding how to run them via Go tools.

I run it only on my dev machine, so it's testing Vulkan only.

avive commented 4 years ago

Guys, we need basic sanity test in the app and some correctness unit and api tests to pass before we can merge this into develop. When can this be done?

AndrewAR2 commented 4 years ago

Added basic sanity test.

avive commented 4 years ago

Looks like the windows build action is failing.

avive commented 4 years ago

Please update the readme requirements in terms of required sdks to build. Also - Looks like this is buildable on OS X but that the build action install the Vulkan 1.1 sdk. Doesn't this update require change to build github actions to use the 1.2 sdk?

avive commented 4 years ago

@AndrewAR2 - is this ready for @moshababo review?

AndrewAR2 commented 4 years ago

No. After fixing the provider numbering error, I get the wrong result for Vulkan 1.2 for macOS. I am investigating this.

avive commented 3 years ago

Any additional work on this pr or can it be merged?

moshababo commented 3 years ago

When running on macOS the test app for getting the providers list, i'm getting only the CPU provider. Any ideas why? I've upgraded to Vulkan 1.2.141.0.

Moshes-MacBook-Pro:build moshababo$ ./test/gpu-setup-test --list
Available POST compute providers:
  0: [CPU] CPU
AndrewAR2 commented 3 years ago

Have you set environment variables for the Vulkan runtime?

avive commented 3 years ago

Have you set environment variables for the Vulkan runtime?

Is this a runtime requirement? I thought this is only a dev-dependancy. If possible we'd like not to need to set up env vars on end-users machines... it is problematic.

AndrewAR2 commented 3 years ago

Is this a runtime requirement?

Yes, this is the Vulkan runtime requirement.

avive commented 3 years ago

Is this a runtime requirement?

Yes, this is the Vulkan runtime requirement.

I don't understand - can you please be a bit more specific? Does the end-user need to install the Vulkan SDK on his system in order to use a Vulkan provider? I thought that the SDK and the env are for build-time only, not for runtime. The Vulkan SDK is huge and complex and we don't want to add it as a runtime dependency if possible.

AndrewAR2 commented 3 years ago

I don't understand - can you please be a bit more specific? Does the end-user need to install the Vulkan SDK on his system in order to use a Vulkan provider? I thought that the SDK and the env are for build-time only, not for runtime. The Vulkan SDK is huge and complex and we don't want to add it as a runtime dependency if possible.

Since Vulkan API is not part of macOS, none of its components come standard with macOS. On macOS, the Vulkan API does not interact with the GPU directly, but uses MoltenVK to translate to the standard Metal API. The Vulkan SDK includes the Khronos‐branded Vulkan loader binary for Linux and macOS. The loader discovers and manages the Vulkan devices and layers available to the application.

avive commented 3 years ago

I don't understand - can you please be a bit more specific? Does the end-user need to install the Vulkan SDK on his system in order to use a Vulkan provider? I thought that the SDK and the env are for build-time only, not for runtime. The Vulkan SDK is huge and complex and we don't want to add it as a runtime dependency if possible.

Since Vulkan API is not part of macOS, none of its components come standard with macOS. On macOS, the Vulkan API does not interact with the GPU directly, but uses MoltenVK to translate to the standard Metal API. The Vulkan SDK includes the Khronos‐branded Vulkan loader binary for Linux and macOS. The loader discovers and manages the Vulkan devices and layers available to the application.

Thanks for the answer. A follow-up question: Is there an installer just for the runtime without the full Vulkan sdk?

AndrewAR2 commented 3 years ago

Thanks for the answer. A follow-up question: Is there an installer just for the runtime without the full Vulkan sdk?

Unfortunately no.

avive commented 3 years ago

Thanks for the answer. A follow-up question: Is there an installer just for the runtime without the full Vulkan sdk?

Unfortunately no.

I did some research. Looks like it might be possible to build a moltenVK runtime library for os X and distribute it: https://github.com/KhronosGroup/MoltenVK#building-moltenvk Isn't this the only runtime that is required?

avive commented 3 years ago

Let's leave the OS X runtime outside of this PR. @moshababo - any other issue or can this be merged?

moshababo commented 3 years ago

No other issues, it can be merged.