Skip to content

Commit 6941460

Browse files
authored
[Misc] Taichi v1.2.2: downgrade libMoltenVk.dylib (#6569)
Issue: # ### Brief Summary
1 parent 12ab828 commit 6941460

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

.github/workflows/release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ jobs:
195195

196196
- name: Create Python Wheel
197197
run: |
198-
brew install molten-vk
198+
# Use the molten-vk v1.1.10 downloaded from taichi assets
199+
brew uninstall molten-vk -f
199200
export PATH=$(pwd)/taichi-llvm/bin/:$PATH
200201
.github/workflows/scripts/unix-build.sh
201202
env:

.github/workflows/scripts/aot-demo.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,18 @@ function build-and-test-headless-demo {
9999
setup-android-ndk-env
100100

101101
pushd taichi
102-
export TAICHI_REPO_DIR=$(pwd)
102+
setup_python
103+
popd
104+
105+
export TAICHI_REPO_DIR=$(pwd)/taichi
106+
107+
pushd taichi
108+
pip install /taichi-wheel/*.whl
109+
sudo chmod 0777 $HOME/.cache
103110
popd
104111

105112
rm -rf taichi-aot-demo
106-
git clone --recursive --depth=2 https://github.com/taichi-dev/taichi-aot-demo
113+
git clone --recursive https://github.com/taichi-dev/taichi-aot-demo
107114
cd taichi-aot-demo
108115

109116
git checkout 28f1df9a5b33bd21b4b46b6ca081275dfd037a16
@@ -117,6 +124,10 @@ function build-and-test-headless-demo {
117124
grab-android-bot
118125
trap release-android-bot EXIT
119126
adb connect $BOT
127+
128+
# clear temporary test folder
129+
adb shell "rm -rf /data/local/tmp/*"
130+
120131
cd headless
121132
BINARIES=$(ls E*)
122133
for b in $BINARIES; do

.github/workflows/testing.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ jobs:
228228
- name: Build & Install
229229
if: needs.check_files.outputs.run_job == 'true'
230230
run: |
231-
brew install molten-vk
231+
# Use the molten-vk v1.1.10 downloaded from taichi assets
232+
brew uninstall molten-vk -f
232233
.github/workflows/scripts/unix-build.sh
233234
env:
234235
CXX: clang++
@@ -641,6 +642,6 @@ jobs:
641642
run: |
642643
. .github/workflows/scripts/common-utils.sh
643644
chown -R 1000:1000 .
644-
ci-docker-run --name taichi-test-capi-headless-demo \
645+
ci-docker-run-gpu --name taichi-test-capi-headless-demo \
645646
registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.6 \
646647
/home/dev/taichi/.github/workflows/scripts/aot-demo.sh build-and-test-headless-demo

cmake/TaichiCore.cmake

+12-5
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,19 @@ endif()
332332
if (TI_WITH_VULKAN)
333333
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTI_WITH_VULKAN")
334334
if (APPLE)
335-
find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED)
336-
configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY)
337-
message(STATUS "MoltenVK library ${MOLTEN_VK}")
338-
if (EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib)
339-
install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime)
335+
# The latest Molten-vk v1.2.0 and v1.1.11 breaks GGUI: mpm3d_ggui.py
336+
# So we have to manually download and install Molten-vk v1.10.0
337+
#
338+
# Uncomment the following lines if the mpm3d_ggui.py runs well with the latest Molten-vk
339+
#find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED)
340+
#configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY)
341+
#message(STATUS "MoltenVK library ${MOLTEN_VK}")
342+
343+
if(NOT EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib)
344+
execute_process(COMMAND curl -L -o ${CMAKE_BINARY_DIR}/libMoltenVK.zip https://github.com/taichi-dev/taichi_assets/files/9977436/libMoltenVK.dylib.zip)
345+
execute_process(COMMAND tar -xf ${CMAKE_BINARY_DIR}/libMoltenVK.zip --directory ${CMAKE_BINARY_DIR})
340346
endif()
347+
install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime)
341348
endif()
342349
add_subdirectory(taichi/rhi/vulkan)
343350
add_subdirectory(taichi/runtime/program_impls/vulkan)

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.2.1
1+
v1.2.2

0 commit comments

Comments
 (0)