mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: More clang tidy cleanups in `torch/csrc`. This time: 1. `hicpp-use-equals-default` recommends `= default` instead of `{}` for constructors/destructors. This is better practice because it expresses the intent better (https://stackoverflow.com/questions/6502828/what-does-default-mean-after-a-class-function-declaration) 2. `readability-inconsistent-declaration-parameter-name` enforces that parameter names in the declaration match parameter names in the definition. This is just generally useful and can prevent confusion and bugs. Also updated my script a little bit. apaszke ezyang Pull Request resolved: https://github.com/pytorch/pytorch/pull/9737 Differential Revision: D9069069 Pulled By: goldsborough fbshipit-source-id: f7b3f3a4eb4c9fadc30425a153566d3b613a41ae
34 lines
743 B
Bash
Executable File
34 lines
743 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
|
|
|
|
pushd $SCRIPTPATH
|
|
source ./build_common.sh
|
|
|
|
echo "Building Caffe2"
|
|
|
|
mkdir -p $CAFFE2_BUILDPATH
|
|
pushd $CAFFE2_BUILDPATH
|
|
|
|
cmake -DUSE_CUDA:BOOL=$USE_CUDA \
|
|
-DBUILD_TORCH=ON \
|
|
-DUSE_OPENMP:BOOL=${USE_OPENMP:ON} \
|
|
-DBUILD_CAFFE2=OFF \
|
|
-DBUILD_ATEN=ON \
|
|
-DBUILD_PYTHON=OFF \
|
|
-DBUILD_BINARY=OFF \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DONNX_NAMESPACE=$ONNX_NAMESPACE \
|
|
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \
|
|
-DCMAKE_INSTALL_PREFIX:STRING=$INSTALL_PREFIX \
|
|
-DCMAKE_INSTALL_MESSAGE=NEVER \
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
|
|
-G "$GENERATE" \
|
|
$PYTORCHPATH/
|
|
$MAKE -j "$JOBS" install
|
|
|
|
popd
|
|
popd
|