Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compatible issue between Alibaba hg submission and official tf release #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ if(NOT LG_PATH)
message( FATAL_ERROR "LG_PATH is not defined" )
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mavx2 -msse2 -msse4 -D_GLIBCXX_USE_CXX11_ABI=0")

add_subdirectory(${LG_PATH} loadgen)

find_package(OpenCV REQUIRED)
set(TF_PATH $ENV{TF_PATH})
set(CMAKE_CXX_FLAGS "-Wl,--no-undefined -fPIC -std=c++11 -fopenmp -D_GLIBCXX_USE_CXX11_ABI=1")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mavx2 -msse2 -msse4")
set(CMAKE_CXX_FLAGS "-Wl,--no-undefined -fPIC -std=c++11 -fopenmp -D_GLIBCXX_USE_CXX11_ABI=0")
execute_process(COMMAND bash "-c" "${PROJECT_SOURCE_DIR}/tf_version.sh" OUTPUT_VARIABLE TF_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND bash "-c" "${PROJECT_SOURCE_DIR}/python_site.sh" OUTPUT_VARIABLE PYTHON_SITE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Click [here](https://github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz) to
```shell
cd tensorflow-1.13.1
./configure
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package ../
pip install ../tensorflow-1.13.1-cp35-cp35m-linux_x86_64.whl
```

#### Build Tensorflow CC

```shell
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow:libtensorflow_cc.so
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow_cc.so
```

### MLPerf Inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Click [here](https://github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz) to
```shell
cd tensorflow-1.13.1
./configure
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package ../
pip install ../tensorflow-1.13.1-cp35-cp35m-linux_x86_64.whl
```

#### Build Tensorflow CC

```shell
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow:libtensorflow_cc.so
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow_cc.so
```

### MLPerf Inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Click [here](https://github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz) to
```shell
cd tensorflow-1.13.1
./configure
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package ../
pip install ../tensorflow-1.13.1-cp35-cp35m-linux_x86_64.whl
```

#### Build Tensorflow CC

```shell
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow:libtensorflow_cc.so
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow_cc.so
```

### MLPerf Inference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Click [here](https://github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz) to
```shell
cd tensorflow-1.13.1
./configure
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package ../
pip install ../tensorflow-1.13.1-cp35-cp35m-linux_x86_64.whl
```

#### Build Tensorflow CC

```shell
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma //tensorflow:libtensorflow_cc.so
$ bazel build -c opt --copt=-msse4.2 --copt=-mavx2 --copt=-mfma --copt=-D_GLIBCXX_USE_CXX11_ABI=0 //tensorflow:libtensorflow_cc.so
```

### MLPerf Inference
Expand Down