Files
rocm-systems/samples/2_Cookbook/20_hip_vulkan/buildcmd.txt
T
ROCm CI Service Account 34976df246 SWDEV-385161 - Deprecate usage of env vars in HIP samples and tests (#363)
* SWDEV-385161 - Deprecate usage of env vars in HIP samples and tests env vars such as HIP_PATH, ROCM_PATH, HIP_COMPILER, HIP_RUNTIME, HSA_PATH etc are removed.

Change-Id: I280e20b291cfb14675846aae72d97fa5b3ad567d
2023-08-14 12:06:14 +05:30

31 lines
1.5 KiB
Plaintext

Windows
--------
• Install hip and visual studio
• Install vulkan sdk from vulkan.lunarg.com
• Download GLFW binaries from glfw.org
• Convert sinwave.farg and vert files to spv
o c:\VulkanSDK\1.2.182.0\bin\glslangValidator.exe sinewave.vert -V -o vert.spv
o c:\VulkanSDK\1.2.182.0\bin\glslangValidator.exe sinewave.frag -V -o frag.spv
to build without cmake:
• set HCC_AMDGPU_TARGET=gfx906:sramecc-:xnack- (for your graphic card, you can get the name from hipinfo )
• hipcc -v *.cpp *.hip -Ic:\VulkanSDK\1.2.182.0\include -L c:\VulkanSDK\1.2.182.0\lib -Ic:\glfw-3.3.4.bin.WIN64\include -L c:\glfw-3.3.4.bin.WIN64\lib-vc2019 -Ic:\hip\include\hip -lglfw3dll -lvulkan-1 -ladvapi32 -std=c++14
• run a.exe, you should see a 3D sinewave simulation
to build with cmake on windows:
• mkdir build; cd build
• cmake.exe -GNinja -DCMAKE_CXX_COMPILER_ID=ROCMClang -DCMAKE_C_COMPILER_ID=ROCMClang -DCMAKE_PREFIX_PATH=d:\driver2\drivers\drivers\compute\hip_sdk
Linux
------
• Ideally, vulkan should be picked up by cmake from the location where it is installed. eg: /usr/lib
• If a specific version of vulkan is needed, install vulkan sdk from vulkan.lunarg.com following the steps
• To run this sample, connect to the machine where display is enabled using NoMachine app
Build with CMake:
• mkdir build; cd build
• cmake -DCMAKE_PREFIX_PATH=path\to\rocm -DHIP_CXX_COMPILER=path\to\clang
• make
• run hipVulkan executable