Skip to content

Commit

Permalink
Remove --cxxopt=--std=c++17 as now by default option
Browse files Browse the repository at this point in the history
  • Loading branch information
asus4 committed Nov 7, 2023
1 parent 53c84a5 commit 47a5744
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build_tflite.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def build_mac(enable_xnnpack = True):
original = '"cpu": "darwin",'
patched = '"cpu": "darwin_x86_64",'
patch(cpuinfo_file, original, patched)
run_cmd('bazel build --config=macos --cpu=darwin_x86_64 --macos_cpus=x86_64 --apple_platform_type=macos --cxxopt=--std=c++17 -c opt --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -fvisibility=default --linkopt -s --strip always //tensorflow/lite/delegates/gpu:tensorflow_lite_gpu_dylib')
run_cmd('bazel build --config=macos_arm64 --cpu=darwin_arm64 --macos_cpus=arm64 --apple_platform_type=macos --cxxopt=--std=c++17 -c opt --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -fvisibility=default --linkopt -s --strip always //tensorflow/lite/delegates/gpu:tensorflow_lite_gpu_dylib')
run_cmd('bazel build --config=macos --cpu=darwin_x86_64 --macos_cpus=x86_64 --apple_platform_type=macos -c opt --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -fvisibility=default --linkopt -s --strip always //tensorflow/lite/delegates/gpu:tensorflow_lite_gpu_dylib')
run_cmd('bazel build --config=macos_arm64 --cpu=darwin_arm64 --macos_cpus=arm64 --apple_platform_type=macos -c opt --copt -Os --copt -DTFLITE_GPU_BINARY_RELEASE --copt -fvisibility=default --linkopt -s --strip always //tensorflow/lite/delegates/gpu:tensorflow_lite_gpu_dylib')
# Export path contains postfix like `applebin_macos-darwin_arm64-opt-ST-*`
metal_delegate_pathes = glob.glob(f'{TENSORFLOW_PATH}/bazel-out/applebin_macos-darwin*/bin/tensorflow/lite/delegates/gpu/tensorflow_lite_gpu_dylib.dylib')
print(metal_delegate_pathes)
Expand Down Expand Up @@ -90,13 +90,13 @@ def build_linux(enable_xnnpack = True):

def build_ios():
# Main
run_cmd('bazel build -c opt --config=ios_arm64 --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteC_framework')
run_cmd('bazel build -c opt --config=ios_arm64 //tensorflow/lite/ios:TensorFlowLiteC_framework')
unzip('bazel-bin/tensorflow/lite/ios/TensorFlowLiteC_framework.zip', 'iOS')
# Metal Delegate
run_cmd('bazel build -c opt --config=ios_arm64 --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteCMetal_framework')
run_cmd('bazel build -c opt --config=ios_arm64 //tensorflow/lite/ios:TensorFlowLiteCMetal_framework')
unzip('bazel-bin/tensorflow/lite/ios/TensorFlowLiteCMetal_framework.zip', 'iOS')
# CoreML Delegate
run_cmd('bazel build -c opt --config=ios_arm64 --cxxopt=--std=c++17 //tensorflow/lite/ios:TensorFlowLiteCCoreML_framework')
run_cmd('bazel build -c opt --config=ios_arm64 //tensorflow/lite/ios:TensorFlowLiteCCoreML_framework')
unzip('bazel-bin/tensorflow/lite/ios/TensorFlowLiteCCoreML_framework.zip', 'iOS')
# SelectOps Delegate
# run_cmd('bazel build -c opt --config=ios --ios_multi_cpus=armv7,arm64,x86_64 //tensorflow/lite/ios:TensorFlowLiteSelectTfOps_framework')
Expand Down

0 comments on commit 47a5744

Please sign in to comment.