diff --git a/imperative/src/impl/interpreter_impl.cpp b/imperative/src/impl/interpreter_impl.cpp index de521f22c31e9de40c8860256e8bd3c827af9bc5..748c3dcdf970c596a63f43d2b5b7b1d7f2aa977d 100644 --- a/imperative/src/impl/interpreter_impl.cpp +++ b/imperative/src/impl/interpreter_impl.cpp @@ -187,6 +187,7 @@ void ChannelImpl::produce_tensor(TensorInfo* dest, TensorPtr ptr) { } void ChannelImpl::process_one_task(Command& cmd) { + //TODO: remove std::visit for support osx 10.12 std::visit([this](auto& cmd) { using T = std::remove_reference_t; try { diff --git a/imperative/src/test/helper.cpp b/imperative/src/test/helper.cpp index 4f38813cc30693a718bf60697fd481b73d5de17e..2c369ae616b3e550f9f87fe779eb4f497444755c 100644 --- a/imperative/src/test/helper.cpp +++ b/imperative/src/test/helper.cpp @@ -107,6 +107,7 @@ void OprChecker::run(std::vector inp_keys) { auto graph = ComputingGraph::make(); graph->options().graph_opt_level = 0; for (size_t i = 0; i < nr_inps; ++ i) { + //TODO: remove std::visit for support osx 10.12 host_inp[i] = std::visit([&gen](auto&& arg) -> HostTensorND { using T = std::decay_t; if constexpr (std::is_same_v) { diff --git a/scripts/whl/macos/macos_build_whl.sh b/scripts/whl/macos/macos_build_whl.sh index bbf4a1b1885384dfdf3bf69f9d579c0f3196ab76..08b197f7febcd3bbbe46ac3b65dedd490ec7cef5 100755 --- a/scripts/whl/macos/macos_build_whl.sh +++ b/scripts/whl/macos/macos_build_whl.sh @@ -112,6 +112,10 @@ function do_build() { export EXTRA_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${PYTHON_DIR} -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} " #config build type to RelWithDebInfo to enable MGB_ENABLE_DEBUG_UTIL etc export EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=RelWithDebInfo " + #we use std::visit in src, so set osx version minimum to 10.14, but 10.14 have objdump + #issue, so we now config to 10.15, whl name to 10.14 + #TODO: can set to 10.12 after remove use std::visit + export EXTRA_CMAKE_ARGS="${EXTRA_CMAKE_ARGS} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 " #call build and install #FIXME: cmake do not triger update python config, after @@ -164,9 +168,7 @@ function do_build() { cd ${BUILD_DIR}/staging/dist/ org_whl_name=`ls Meg*.whl` index=`awk -v a="${org_whl_name}" -v b="-macosx" 'BEGIN{print index(a,b)}'` - #compat for osx version from 10.5(Leopard) - #FIXME: same no need at -macosx-version-min=10.5 for build so - compat_whl_name=`echo ${org_whl_name} |cut -b -$index`macosx_10_5_x86_64.whl + compat_whl_name=`echo ${org_whl_name} |cut -b -$index`macosx_10_14_x86_64.whl echo "org whl name: ${org_whl_name}" echo "comapt whl name: ${compat_whl_name}" cp ${BUILD_DIR}/staging/dist/Meg*.whl ${MACOS_WHL_HOME}/${compat_whl_name}