mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[cmake] Use list(APPEND instead of string(APPEND for vulkan codegen args
This was causing the shaders to be incorrectly templated because both the precision argument and the format argument were being treated as a single argument by argparse and therefore pasted into shaders incorrectly. In turn this meant that shaders couldn't be compiled when the precision or format options were turned on. Fixes #76195 Pull Request resolved: https://github.com/pytorch/pytorch/pull/76196 Approved by: https://github.com/dagitses
This commit is contained in:
committed by
PyTorch MergeBot
parent
bc9bba9b43
commit
111b2bf9da
@ -7,10 +7,10 @@ set(VULKAN_GEN_OUTPUT_PATH "${CMAKE_BINARY_DIR}/vulkan/ATen/native/vulkan")
|
||||
set(VULKAN_GEN_ARG_ENV "")
|
||||
|
||||
if(USE_VULKAN_RELAXED_PRECISION)
|
||||
string(APPEND VULKAN_GEN_ARG_ENV "precision=mediump")
|
||||
list(APPEND VULKAN_GEN_ARG_ENV "precision=mediump")
|
||||
endif()
|
||||
if(USE_VULKAN_FP16_INFERENCE)
|
||||
string(APPEND VULKAN_GEN_ARG_ENV "format=rgba16f")
|
||||
list(APPEND VULKAN_GEN_ARG_ENV "format=rgba16f")
|
||||
endif()
|
||||
|
||||
if(USE_VULKAN_SHADERC_RUNTIME)
|
||||
|
Reference in New Issue
Block a user