Skip to content

Commit 3456c2c

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Allow build_android.sh to forward Vulkan args (pytorch#69332)
Summary: Pull Request resolved: pytorch#69332 --- ## Context The `build_android.sh` script currently does not forward Vulkan configuration options, which makes it impossible to control them when running `build_pytorch_android.sh`. ## Changes Slightly change the script to allow Vulkan configuration options to propagate from `build_pytorch_android.sh` to `build_android.sh` Test Plan: Imported from OSS Reviewed By: beback4u Differential Revision: D32840908 Pulled By: SS-JIA fbshipit-source-id: e55d89c93c996b92b743cf047f5a285bb516bbc4
1 parent fa39754 commit 3456c2c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/build_android.sh

+9
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ fi
153153

154154
if [ -n "${USE_VULKAN}" ]; then
155155
CMAKE_ARGS+=("-DUSE_VULKAN=ON")
156+
if [ -n "${USE_VULKAN_FP16_INFERENCE}" ]; then
157+
CMAKE_ARGS+=("-DUSE_VULKAN_FP16_INFERENCE=ON")
158+
fi
159+
if [ -n "${USE_VULKAN_RELAXED_PRECISION}" ]; then
160+
CMAKE_ARGS+=("-DUSE_VULKAN_RELAXED_PRECISION=ON")
161+
fi
162+
if [ -n "${USE_VULKAN_SHADERC_RUNTIME}" ]; then
163+
CMAKE_ARGS+=("-DUSE_VULKAN_SHADERC_RUNTIME=ON")
164+
fi
156165
fi
157166

158167
# Use-specified CMake arguments go last to allow overridding defaults

0 commit comments

Comments
 (0)