Open avive opened 3 years ago
Progress on dev setup using the instructions at top of this smip:
For me it works on Linux/Nvidia, Linux-Docker/Nvida, Windows/Nvidia/UHD.
For me it works on Linux/Nvidia, Linux-Docker/Nvida, Windows/Nvidia/UHD.
if you share your tests flow i can try on all platforms for amd/vulkan - we have the hardware to test.
TL;DR - go-spacemesh dev env setup
Follow these steps to properly link go-spacemesh with the gpu-post platform libs:
Quick test to verify linking works: use the SmesherService::GetProviders() method - it is implemented in the gpu-post c-lib.
macOS gpu-post artifacts
Q: Why are there so many files? A: Apple doesn't include Vulkan drivers in macOS so they must be installed manually. The Vulkan runtime installer is much larger, so we provide these files to get Vulkan working. In Linux and Windows, full Vulkan support is included in the gpu driver if the gpu supports Vulkan.
Linux gpu-post artifacts
Windows gpu-post artifacts
Tasks
Verify dev env setup on the following:
[x] Windows 10 home Nvidia gpu
Overview
go-spacemesh uses several dynamic libraries which are platform-specific. These libs needs to be linked by go-spacemesh in releases, testnets and ci.
Scenarios
Platforms
Scenario 1: Developer: running a single go-spacemesh built locally from source code
Solution: see working instructions at top of this doc.
Scenario 2: Developer - Running local-net via terminal
Localnet nodes run in a linux docker container without access to the host system gpu drivers apis. The task here is to configure each node to link with the linux .so lib so they can generate post using cpu provider.
Scenario 3: Developer - Running go-spacemesh tests on local machine from cloned repo
Task: we need to find a setup that will enable running gpu-post integration tests in go-spacemesh.
Scenario 4: Developer - Running go-spacemesh tests in automation via GHA
Task: configure go-sm integration tests to link with libgpu-post.so so cpu provider can be used.
Scenario 5: Automation - Building go-spacemesh releases
Scenario 6: 6. Automation - Building Smapp releases
Task: modify smapp release code to add all the gpu-post artifacts for each of the 3 platforms to the go-spacemesh directory on user's machine after install.
Scenario 7: Developer - Running go-spacemesh managed nodes in a testnet
Task: list here required changes to Spacecraft to support libs linking.
Scenario 8. User: Running go-spacemesh via terminal
The directory will have the artifacts for the user's platform so user doesn't need to do anything to get gpu-post to work.
Scenario 9. User: Running go-spacemesh via Smapp (or any other client which manages a node)
Smapp changes:
Smapp installer needs to copy the artifacts for the user's platform to the go-spacemesh directory so it will be able to link to them.
Smapp MUST set go-spacemesh process directory to the go-spacemesh executable directory if it launches it from a working directory different than the exe directory.
As an alternative, set VK_ICD_FILENAMES env VAR to the go-spacemesh exe directory and start it from any working dir.
Working Directory
Go-spacemesh process working folder MUST be the same as the exe folder and not any other.
As an alternative,
VK_ICD_FILENAMES
ENV VAR can be set to the go-spacemesh exe directory.Go-spacemesh build changes
macOS
Linux
Use patchelf
Windows
Q: is this needed? what's the cli to do this?
About MoltenVK_icd.json