pytorch/caffe2
Edward Yang 0e5200adfe Refactor target_compile_options into torch_compile_options (#29730)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/29730

Back in the day, Caffe2 had a good idea: instead of spattering
target_compile_options all over the codebase, define a helper
function which sets all the options for a target.  This is especially
helpful if I want to split libtorch.so into libtorch_cpu.so
and libtorch_cuda.so; I need a way to easily apply options
to multiple targets.  A shared helper function is just the ticket.

I moved every target_compile_options call in caffe2/CMakeLists.txt
that didn't seem target dependent (exclusions included OpenMP flags,
API-related macros, ONNX related macros and HIP flags) into
torch_compile_options.  I slavishly preserved the structure:
there's a nearly redundant WERROR if() in the output but I preserved
it.

There is one thing I don't like about this, which is that now
the compile options are off in a random directory that no one would
expect.  But c'est la vie...

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Test Plan: Imported from OSS

Differential Revision: D18571166

Pulled By: ezyang

fbshipit-source-id: 21cd5f7663485077600782078fbb1787fab09035
2019-11-18 07:05:48 -08:00
..
contrib Switch ScriptModuleOp to use a unique_ptr 2019-11-14 19:36:00 -08:00
core Remove TensorImpl::is_variable, deprecate Tensor::is_variable (#29653) 2019-11-14 11:41:02 -08:00
cuda_rtc Change ConvPoolOp<Context>::SetOutputSize to ConvPoolOp<Context>::GetOutputSize (#17764) 2019-03-07 18:38:53 -08:00
db Apply modernize-use-override (2nd iteration) 2019-02-14 16:52:57 -08:00
distributed Manual hipify caffe2/distributed and rocm update (no hcc modules support) (#18088) 2019-03-29 11:07:32 -07:00
experiments Tensor construction codemod(ResizeLike) - 1/7 (#15073) 2018-12-19 21:38:48 -08:00
ideep Build torch.distributed with Gloo backend on macOS (#25260) 2019-09-05 07:09:50 -07:00
image Clang-format ImageInputOp (#20441) 2019-05-16 23:00:09 -07:00
mobile Remove API-level guard on NeuralNetworks.h (#22429) 2019-07-01 22:09:11 -07:00
mpi Tensor construction codemod(ResizeLike) - 3/7 (#15122) 2018-12-14 02:08:37 -08:00
observers Remove GPU dependency from ProfileObserver (#17592) 2019-03-04 10:00:46 -08:00
onnx Support Offline Tensors through ONNXIFI layer 2019-10-31 10:33:42 -07:00
operators SeqBlobReader Implementation (#29888) 2019-11-16 01:18:54 -08:00
opt Support Offline Tensors through ONNXIFI layer 2019-10-31 10:33:42 -07:00
perfkernels fix comment index_size->output_size (#29831) 2019-11-16 01:49:02 -08:00
predictor BlackBoxPredictor OSS part N + 1 : strip fb/predictor/Transforms.h dependency (#23350) (#23350) 2019-08-22 17:11:00 -07:00
proto Add TensorShapeAndType (#29848) 2019-11-15 13:06:06 -08:00
python Switch ScriptModuleOp to use a unique_ptr 2019-11-14 19:36:00 -08:00
quantization Avoid keeping old histograms in the histogram observer to fix the OOM issue (#29768) 2019-11-15 12:30:44 -08:00
queue Revert "Tensor construction codemod(raw_mutable_data) (#16373)" (#18680) 2019-04-01 14:39:13 -07:00
serialize In torch::save(), make padding computation faster. (#29425) 2019-11-08 15:03:25 -08:00
sgd Implementation of cosine learning rate training policy (#29440) 2019-11-08 12:27:59 -08:00
share Change ConvPoolOp<Context>::SetOutputSize to ConvPoolOp<Context>::GetOutputSize (#17764) 2019-03-07 18:38:53 -08:00
test
transforms fix -Wsign-compare warnings for some files inside c2 (#18123) 2019-03-19 10:39:20 -07:00
utils Fix deadlock issues in ThreadPool (#29885) 2019-11-15 19:27:52 -08:00
video OpenCV 4 compatibility fix for caffe2/video (#24143) 2019-08-10 14:50:20 -07:00
__init__.py
.clang-format
c2_aten_srcs.bzl Remove Tensor.h, TensorMethods.h from src/core. (#27086) 2019-10-06 09:37:50 -07:00
CMakeLists.txt Refactor target_compile_options into torch_compile_options (#29730) 2019-11-18 07:05:48 -08:00
README.md
release-notes.md
requirements.txt Add requests as a legit dependency (#25596) 2019-09-04 17:43:37 -07:00
VERSION_NUMBER

Caffe2

Jenkins Build Status

Caffe2 is a lightweight, modular, and scalable deep learning framework. Building on the original Caffe, Caffe2 is designed with expression, speed, and modularity in mind.

Questions and Feedback

Please use Github issues (https://github.com/pytorch/pytorch/issues) to ask questions, report bugs, and request new features.

Further Resources on Caffe2.ai