pytorch/caffe2/core
Adam Simpkins aae1023bed [caffe2] allow passing options to the DB in Save operations (#55935)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55935

Add a new `DB::SetOptions()` method to allow passing options to the DB as part
of Save operations.  This can be used for passing in options to control the
serialization behavior, such as rate limits or other parameters.  The
serialization options are passed is an opaque string, so that different DB
implementations may choose their own options and options format.

This also adds a new `db_options` parameter to the `Save` operator.
This allows users to pass in the DB options when saving data.
ghstack-source-id: 126589771

Test Plan:
I don't have any tests in this diff since no DB implements options yet.  The
next diff in the stack includes an options implementation, along with unit
tests that verify the options are passed in correctly.

Differential Revision: D27729461

fbshipit-source-id: 4d03250c389c66a049cdee1d05e082f5649ac0f0
2021-04-15 14:45:47 -07:00
..
hip
nomnigraph Lint trailing newlines (#54737) 2021-03-30 13:09:52 -07:00
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00
allocator.cc
allocator.h
blob.h
blob_gpu_test.cc
blob_serialization.cc [caffe2] support serializing float data as bfloat16 (#53735) 2021-03-24 13:27:22 -07:00
blob_serialization.h [caffe2] add a SerializationOptions field for the save operator (#53402) 2021-03-11 13:02:58 -08:00
blob_serialization_gpu.cc
blob_serializer_base.h [caffe2] add a SerializationOptions field for the save operator (#53402) 2021-03-11 13:02:58 -08:00
blob_stats.cc
blob_stats.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
blob_test.cc [caffe2] add a SerializationOptions field for the save operator (#53402) 2021-03-11 13:02:58 -08:00
CMakeLists.txt Compile less legacy code when BUILD_CAFFE2 is set to False (take 2) (#44453) 2020-09-11 16:27:47 -07:00
common.cc
common.h [caffe2] add a CAFFE2_NODISCARD macro to help support old compilers (#53754) 2021-03-12 11:32:30 -08:00
common_cudnn.cc
common_cudnn.h
common_gpu.cc [c10/cuda] Reorganize device_count() and robustly surface ASAN warnings (#42249) 2020-08-05 11:39:31 -07:00
common_gpu.h Introducing TORCH_CUDA_CPP_API and TORCH_CUDA_CU_API to the code (#50627) 2021-01-21 19:09:11 -08:00
common_omp.h
common_test.cc Lint trailing newlines (#54737) 2021-03-30 13:09:52 -07:00
context.cc
context.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
context_base.cc
context_base.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
context_gpu.cu use device methods (#52899) 2021-03-02 20:14:23 -08:00
context_gpu.h Don't switch streams when running Caffe2 ops from c10. (#55121) 2021-04-08 13:21:11 -07:00
context_gpu_test.cc
context_test.cc
cudnn_wrappers.h
db.cc Properly format db.h and db.cc (#43027) 2020-08-24 18:29:45 -07:00
db.h [caffe2] allow passing options to the DB in Save operations (#55935) 2021-04-15 14:45:47 -07:00
distributions_stubs.h caffe2: use at::mt19937 instead of std::mt19937 (10x speedup) (#43987) 2020-10-16 16:08:35 -07:00
event.cc Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
event.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
event_cpu.h
event_gpu.cc
event_gpu_test.cc
event_test.cc
export_c10_op_to_caffe2.cc
export_c10_op_to_caffe2.h
export_caffe2_op_to_c10.h Don't switch streams when running Caffe2 ops from c10. (#55121) 2021-04-08 13:21:11 -07:00
flags.h
graph.cc
graph.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
graph_test.cc
init.cc
init.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
init_denormals.cc
init_intrinsics_check.cc
init_omp.cc
init_test.cc
int8_serialization.cc
logging.h
macros.h
macros.h.in Move USE_NUMPY to more appropriate targets (#51143) 2021-01-27 15:44:12 -08:00
memonger.cc [caffe][memonger] Extend operator schema check to dag memonger (#48021) 2020-11-16 19:17:55 -08:00
memonger.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
module.cc
module.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
module_test.cc
net.cc [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
net.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
net_async_base.cc
net_async_base.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
net_async_scheduling.cc [caffe2] adds Cancel to OperatorBase and NetBase (#44145) 2020-09-11 12:50:26 -07:00
net_async_scheduling.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
net_async_task.cc
net_async_task.h
net_async_task_future.cc
net_async_task_future.h
net_async_task_graph.cc
net_async_task_graph.h
net_async_tracing.cc
net_async_tracing.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
net_async_tracing_test.cc
net_dag_utils.cc
net_dag_utils.h
net_dag_utils_test.cc
net_gpu_test.cc
net_parallel.cc
net_parallel.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
net_simple.cc [Caffe2] Implement BlackBoxPredictor::BenchmarkIndividualOps (#52903) 2021-02-27 19:49:22 -08:00
net_simple.h [Caffe2] Implement BlackBoxPredictor::BenchmarkIndividualOps (#52903) 2021-02-27 19:49:22 -08:00
net_simple_refcount.cc
net_simple_refcount.h
net_simple_refcount_test.cc
net_test.cc
numa.cc
numa.h
observer.h
observer_test.cc
operator.cc Move OperatorBase::AddRelatedBlobInfo implementation to .cc file (#40844) 2020-07-01 11:48:15 -07:00
operator.h Don't switch streams when running Caffe2 ops from c10. (#55121) 2021-04-08 13:21:11 -07:00
operator_gpu_test.cc
operator_gradient.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
operator_schema.cc fix comparison of narrow type with wide type in loop condition (#53951) 2021-03-22 16:40:35 -07:00
operator_schema.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
operator_schema_test.cc
operator_test.cc
parallel_net_test.cc
plan_executor.cc pass TypeMeta by value (#45026) 2020-10-30 10:14:17 -07:00
plan_executor.h
plan_executor_test.cc [caffe2] plan_executor_test: add test case for should_stop loops (#47613) 2020-11-16 12:59:13 -08:00
prof_dag_counters.cc fix comparison of narrow type with wide type in loop condition (#53951) 2021-03-22 16:40:35 -07:00
prof_dag_counters.h
qtensor.cc
qtensor.h Use sum_integers and multiply_integers (#51146) 2021-02-10 18:05:45 -08:00
qtensor_serialization.cc
qtensor_serialization.h
scope_guard.h
serialization_test.cc [caffe2] fix deserialization of unknown tensor data_type values (#52411) 2021-02-17 19:13:43 -08:00
static_tracepoint.h
static_tracepoint_elfx86.h
stats.cc use make_shared and make_unique and clean unneeded code (#51829) 2021-02-10 21:38:43 -08:00
stats.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
stats_test.cc
storage.h
tensor.cc Removing non-thread-safe log statement from ReinitializeTensor (#48185) 2020-11-18 17:42:22 -08:00
tensor.h [caffe2] Don't call TensorImpl::size() in dim32() (#53852) 2021-03-12 16:22:29 -08:00
tensor_impl.h
tensor_int8.cc
tensor_int8.h
test_utils.cc
test_utils.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
timer.h
timer_test.cc raise windows tol to 30% (#51733) 2021-02-04 14:09:10 -08:00
transform.cc
transform.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
transform_test.cc
types.cc pass TypeMeta by value (#45026) 2020-10-30 10:14:17 -07:00
types.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
workspace.cc [caffe2] Avoid some double (and triple) lookups in workspace (#53319) 2021-03-04 22:57:02 -08:00
workspace.h [caffe2] Avoid some double (and triple) lookups in workspace (#53319) 2021-03-04 22:57:02 -08:00
workspace_test.cc