Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Public Attributes | List of all members
test_jit.TestJit Class Reference
Inheritance diagram for test_jit.TestJit:
test_jit.JitTestCase common_utils.TestCase expecttest.TestCase

Public Member Functions

def test_big (self)
 
def test_simple (self)
 
def test_restore_device (self)
 
def test_model_save_error (self)
 
def test_single_tuple_trace (self)
 
def test_restore_device_cuda (self)
 
def test_restore_shared_storage_on_cuda (self)
 
def test_typeas_trace_check (self)
 
def test_peephole (self)
 
def test_peephole_dynamic (self)
 
def test_peephole_cuda (self)
 
def test_index (self)
 
def test_disabled (self)
 
def test_train_eval (self)
 
def test_diff_subgraph_clones_constants (self)
 
def test_index_constant (self)
 
def test_scopes (self)
 
def test_scopes_intermediate_node (self)
 
def test_scopes_identity_node (self)
 
def test_canonicalize_tensor_iterator (self)
 
def test_arg_configurations (self)
 
def test_cse (self)
 
def test_recursive_cse (self)
 
def test_shape_analysis_broadcast (self)
 
def test_verify (self)
 
def test_constant (self)
 
def test_legacy_fail (self)
 
def test_inplace_transplant (self)
 
def test_inplace_flags (self)
 
def test_inplace_check (self)
 
def do_trace_size (self, requires_grad)
 
def test_trace_size (self)
 
def test_trace_size_with_grad (self)
 
def test_trace_casts (self)
 
def test_trace_warn (self)
 
def test_trace_tuple (self)
 
def test_trace_random (self)
 
def test_trace_tensor_factory (self)
 
def test_trace_indexed_assignment (self)
 
def test_output_unflatten (self)
 
def test_input_flatten (self)
 
def test_flags (self)
 
def test_python_ir (self)
 
def test_cpp_cuda (self)
 
def test_batchnorm (self)
 
def test_dropout (self)
 
def test_dropout_cuda (self)
 
def test_conv (self)
 
def test_repeated_input (self)
 
def test_repeated_output (self)
 
def test_alexnet (self)
 
def test_inplace_copy (self)
 
def test_shared_param (self)
 
def test_trace_c10_ops (self)
 
def test_nested_inplace (self)
 
def run_ge_tests (self, optimize, use_cuda)
 
def test_ge_unoptimized (self)
 
def test_ge_optimized (self)
 
def test_ge_cuda (self)
 
def test_ge (self)
 
def test_trace_annotation (self)
 
def test_trace_script (self)
 
def test_einsum (self)
 
def test_traced_module_cuda (self)
 
def test_export_no_reorder (self)
 
def test_python_function (self)
 
def test_python_function_tup (self)
 
def test_decompose_addmm (self)
 
def test_index_put (self)
 
def test_sparse_tensors_error (self)
 
def test_tuple_specialization (self)
 
def test_constant_prop_simple (self)
 
def test_constant_prop_nested (self)
 
def test_constant_prop_print (self)
 
def test_constant_prop_rand (self)
 
def test_constant_prop_none (self)
 
def test_constant_prop_if_inline (self)
 
def test_trace_records_names (self)
 
def test_constant_prop_if_constant (self)
 
def test_constant_prop_loop_constant (self)
 
def test_constant_prop_remove_output (self)
 
def test_trace_detach (self)
 
def test_trace_detach_inplace (self)
 
def test_trace_detach_onnx_erase (self)
 
def test_trace_slice_full_dim (self)
 
def test_export_dropout (self)
 
def test_onnx_transpose_incomplete_tensor_type (self)
 
def test_cuda_export_restore (self)
 
def test_export_batchnorm (self)
 
def test_export_rnn (self)
 
def test_export_lstm (self)
 
def test_trace_dict_input (self)
 
def test_trace_variable_instantiation (self)
 
def test_trace_slice_expr_complete_type (self)
 
def test_export_tensoroption_to (self)
 
def test_pretty_printer (self)
 
def test_cu_escaped_number (self)
 
def test_import_method (self)
 
def test_function_default_values (self)
 
def test_module_default_values (self)
 
def test_warnings (self)
 
def test_no_erroneous_warnings (self)
 
def test_torch_load_error (self)
 
def test_legacy_constructors (self)
 
def test_python_bindings (self)
 
- Public Member Functions inherited from test_jit.JitTestCase
def setUp (self)
 
def tearDown (self)
 
def disableModuleHook (self)
 
def emitModuleHook (self, module)
 
def getExportImportCopy (self, m, also_test_file=True, map_location=None)
 
def getExportImportCopyWithPacking (self, m, also_test_file=True, map_location=None)
 
def assertGraphContains (self, graph, kind)
 
def assertGraphContainsExactly (self, graph, kind, num_kind_nodes, consider_subgraphs=False)
 
def assertExpectedONNXGraph (self, trace, args, kwargs)
 
def assertExpectedGraph (self, trace, args, kwargs)
 
def run_pass (self, name, trace)
 
def checkScript (self, script, inputs, optimize=True, outputs=None, name='func', capture_output=False, frames_up=1, check_expected=False)
 
def checkTrace (self, func, reference_tensors, input_tensors=None, optimize=True, drop=None, allow_unused=False, verbose=False, inputs_require_grads=True, check_tolerance=1e-5, export_import=True, _force_outplace=False)
 
def createScriptModuleFromGraph (self, trace)
 
def assertExportImport (self, trace, inputs)
 
def assertExportImportModule (self, m, inputs)
 
def runAndSaveRNG (self, func, inputs, kwargs=None)
 
- Public Member Functions inherited from common_utils.TestCase
def __init__ (self, method_name='runTest')
 
def assertLeaksNoCudaTensors (self, name=None)
 
def wrap_with_cuda_memory_check (self, method)
 
def setUp (self)
 
def assertTensorsSlowEqual (self, x, y, prec=None, message='')
 
def genSparseTensor (self, size, sparse_dim, nnz, is_uncoalesced, device='cpu')
 
def safeToDense (self, t)
 
def safeCoalesce (self, t)
 
def assertEqual (self, x, y, prec=None, message='', allow_inf=False)
 
def assertAlmostEqual (self, x, y, places=None, msg=None, delta=None, allow_inf=None)
 
def assertNotEqual (self, x, y, prec=None, message='')
 
def assertObjectIn (self, obj, iterable)
 
def assertExpectedRaises (self, exc_type, callable, args, kwargs)
 
def assertWarns (self, callable, msg='')
 
def assertWarnsRegex (self, callable, regex, msg='')
 
def assertExpected (self, s, subname=None)
 
- Public Member Functions inherited from expecttest.TestCase
def assertExpectedInline (self, actual, expect, skip=0)
 

Public Attributes

 p0
 
 module
 
 features
 
 b
 
 a
 
 num_layers
 
 submodule
 
 foo
 
 weight
 
 mod
 
 rnn
 

Additional Inherited Members

- Static Public Attributes inherited from common_utils.TestCase
int precision = 1
 
 maxDiff = None
 
 assertRegex = unittest.TestCase.assertRegexpMatches
 
 assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
 
- Static Public Attributes inherited from expecttest.TestCase
bool longMessage = True
 

Detailed Description

Definition at line 569 of file test_jit.py.

Member Function Documentation

def test_jit.TestJit.test_arg_configurations (   self)
Different arg configurations should trigger different traces

Definition at line 916 of file test_jit.py.

def test_jit.TestJit.test_input_flatten (   self)
Check that inputs to traced functions are flattened

Definition at line 1252 of file test_jit.py.

def test_jit.TestJit.test_output_unflatten (   self)
Check that outputs of traced functions retain the original structure and nesting

Definition at line 1243 of file test_jit.py.


The documentation for this class was generated from the following file: