├── caffe2 ├── __init__.py ├── core │ ├── __init__.py │ ├── nomnigraph │ │ └── __init__.py │ ├── numa.cc │ ├── allocator.cc │ ├── numa.h │ ├── logging.h │ ├── flags.h │ ├── macros.h │ ├── qtensor.cc │ ├── allocator.h │ ├── tensor_int8.cc │ └── common_omp.h ├── contrib │ ├── __init__.py │ ├── aten │ │ ├── __init__.py │ │ ├── docs │ │ │ └── __init__.py │ │ └── aten_op.h │ ├── gloo │ │ ├── __init__.py │ │ └── context.h │ ├── nccl │ │ └── __init__.py │ ├── nnpack │ │ └── __init__.py │ ├── prof │ │ └── __init__.py │ ├── script │ │ ├── __init__.py │ │ └── examples │ │ │ └── __init__.py │ ├── playground │ │ ├── __init__.py │ │ └── resnetdemo │ │ │ └── __init__.py │ ├── tensorboard │ │ └── __init__.py │ ├── warpctc │ │ └── __init__.py │ ├── fakelowp │ │ ├── common.h │ │ └── common.cc │ ├── opencl │ │ └── context_test.cc │ └── tensorrt │ │ └── CMakeLists.txt ├── VERSION_NUMBER ├── distributed │ ├── __init__.py │ └── python.pyi ├── experiments │ ├── __init__.py │ └── python │ │ └── __init__.py ├── perfkernels │ └── __init__.py ├── python │ ├── docs │ │ └── __init__.py │ ├── helpers │ │ └── __init__.py │ ├── ideep │ │ └── __init__.py │ ├── mint │ │ └── __init__.py │ ├── mkl │ │ └── __init__.py │ ├── models │ │ ├── __init__.py │ │ └── seq2seq │ │ │ └── __init__.py │ ├── onnx │ │ ├── __init__.py │ │ ├── bin │ │ │ └── __init__.py │ │ ├── tests │ │ │ └── __init__.py │ │ └── error.py │ ├── rnn │ │ └── __init__.py │ ├── test │ │ └── __init__.py │ ├── trt │ │ ├── __init__.py │ │ └── data │ │ │ ├── binoculars.jpeg │ │ │ ├── reflex_camera.jpeg │ │ │ └── tabby_tiger_cat.jpg │ ├── examples │ │ ├── __init__.py │ │ └── resnet50_trainer.py │ ├── fakelowp │ │ └── __init__.py │ ├── modeling │ │ └── __init__.py │ ├── predictor │ │ └── __init__.py │ ├── operator_test │ │ └── __init__.py │ ├── serialized_test │ │ ├── __init__.py │ │ └── data │ │ │ └── operator_test │ │ │ ├── pad_test.test_crop.zip │ │ │ ├── erf_op_test.test_erf.zip │ │ │ ├── top_k_test.test_top_k.zip │ │ │ ├── ceil_op_test.test_ceil.zip │ │ │ ├── clip_op_test.test_clip.zip │ │ │ ├── conv_test.test_1x1_conv.zip │ │ │ ├── find_op_test.test_find.zip │ │ │ ├── math_ops_test.test_sign.zip │ │ │ ├── mean_op_test.test_mean.zip │ │ │ ├── tile_op_test.test_tile.zip │ │ │ ├── adagrad_test.test_adagrad.zip │ │ │ ├── arg_ops_test.test_argmax.zip │ │ │ ├── arg_ops_test.test_argmin.zip │ │ │ ├── boolean_unmask_test.test.zip │ │ │ ├── fc_operator_test.test_fc.zip │ │ │ ├── floor_op_test.test_floor.zip │ │ │ ├── glu_op_test.test_glu_old.zip │ │ │ ├── gru_test.test_gru_unit_op.zip │ │ │ ├── matmul_op_test.test_matmul.zip │ │ │ ├── selu_op_test.test_selu_1.zip │ │ │ ├── utility_ops_test.test_sum.zip │ │ │ ├── activation_ops_test.test_elu.zip │ │ │ ├── adadelta_test.test_adadelta.zip │ │ │ ├── moments_op_test.test_moments.zip │ │ │ ├── utility_ops_test.test_slice.zip │ │ │ ├── activation_ops_test.test_relu.zip │ │ │ ├── activation_ops_test.test_relu_n.zip │ │ │ ├── concat_split_op_test.test_split.zip │ │ │ ├── elementwise_linear_op_test.test.zip │ │ │ ├── gather_ops_test.test_gather_ops.zip │ │ │ ├── hyperbolic_ops_test.test_cosh.zip │ │ │ ├── hyperbolic_ops_test.test_sinh.zip │ │ │ ├── hyperbolic_ops_test.test_tanh.zip │ │ │ ├── jsd_ops_test.test_bernoulli_jsd.zip │ │ │ ├── one_hot_ops_test.test_one_hot.zip │ │ │ ├── recurrent_network_test.test_mul.zip │ │ │ ├── reduce_ops_test.test_reduce_l2.zip │ │ │ ├── reduce_ops_test.test_reduce_max.zip │ │ │ ├── reduce_ops_test.test_reduce_min.zip │ │ │ ├── softmax_ops_test.test_softmax.zip │ │ │ ├── trigonometric_op_test.test_acos.zip │ │ │ ├── trigonometric_op_test.test_asin.zip │ │ │ ├── trigonometric_op_test.test_atan.zip │ │ │ ├── trigonometric_op_test.test_tan.zip │ │ │ ├── unique_ops_test.test_unique_op.zip │ │ │ ├── upsample_op_test.test_upsample.zip │ │ │ ├── utility_ops_test.test_nan_check.zip │ │ │ ├── utility_ops_test.test_size_op.zip │ │ │ ├── utility_ops_test.test_transpose.zip │ │ │ ├── concat_split_op_test.test_concat.zip │ │ │ ├── conditional_test.test_conditional.zip │ │ │ ├── distance_op_test.test_dot_product.zip │ │ │ ├── loss_ops_test.test_averaged_loss.zip │ │ │ ├── matmul_op_test.test_batch_matmul.zip │ │ │ ├── reduce_ops_test.test_reduce_mean.zip │ │ │ ├── sparse_ops_test.testScatterAssign.zip │ │ │ ├── transpose_op_test.test_transpose.zip │ │ │ ├── activation_ops_test.test_leaky_relu.zip │ │ │ ├── boolean_mask_test.test_boolean_mask.zip │ │ │ ├── dropout_op_test.test_dropout_is_test.zip │ │ │ ├── lengths_pad_op_test.test_lengths_pad.zip │ │ │ ├── locally_connected_op_test.test_lc_2d.zip │ │ │ ├── momentum_sgd_test.test_momentum_sgd.zip │ │ │ ├── negate_gradient_op_test.test_forward.zip │ │ │ ├── numpy_tile_op_test.test_numpy_tile.zip │ │ │ ├── one_hot_ops_test.test_batch_one_hot.zip │ │ │ ├── onnx_while_test.test_onnx_while_fibb.zip │ │ │ ├── reduce_ops_test.test_reduce_back_max.zip │ │ │ ├── reduction_ops_test.test_rowwise_max.zip │ │ │ ├── sequence_ops_test.test_add_padding.zip │ │ │ ├── softmax_ops_test.test_softmax_grad.zip │ │ │ ├── upsample_op_test.test_upsample_grad.zip │ │ │ ├── utility_ops_test.test_lengths_gather.zip │ │ │ ├── weighted_sum_test.test_weighted_sum.zip │ │ │ ├── wngrad_test.test_sparse_wngrad_empty.zip │ │ │ ├── wngrad_test.test_wngrad_dense_base.zip │ │ │ ├── adagrad_test.test_sparse_adagrad_empty.zip │ │ │ ├── batch_box_cox_test.test_batch_box_cox.zip │ │ │ ├── box_with_nms_limit_op_test.test_simple.zip │ │ │ ├── channel_stats_op_test.testChannelStats.zip │ │ │ ├── expand_op_test.test_expand_rand_shape.zip │ │ │ ├── gather_ops_test.test_batch_gather_ops.zip │ │ │ ├── group_norm_op_test.test_group_norm_2d.zip │ │ │ ├── lengths_tile_op_test.test_lengths_tile.zip │ │ │ ├── matmul_op_test.test_numpy_batch_matmul.zip │ │ │ ├── one_hot_ops_test.test_segment_one_hot.zip │ │ │ ├── reduce_ops_test.test_reduce_back_mean.zip │ │ │ ├── reduce_ops_test.test_reduce_front_max.zip │ │ │ ├── reduce_ops_test.test_reduce_front_mean.zip │ │ │ ├── reduce_ops_test.test_reduce_front_sum.zip │ │ │ ├── reduction_ops_test.test_columnwise_max.zip │ │ │ ├── sequence_ops_test.test_gather_padding.zip │ │ │ ├── sparse_ops_test.testScatterWeightedSum.zip │ │ │ ├── string_ops_test.test_string_ends_with.zip │ │ │ ├── utility_ops_test.test_elementwise_max.zip │ │ │ ├── utility_ops_test.test_elementwise_min.zip │ │ │ ├── adadelta_test.test_sparse_adadelta_empty.zip │ │ │ ├── bbox_transform_test.test_bbox_transform.zip │ │ │ ├── channel_shuffle_test.test_channel_shuffle.zip │ │ │ ├── elementwise_logical_ops_test.test_where.zip │ │ │ ├── filler_ops_test.test_lengths_range_fill.zip │ │ │ ├── flexible_top_k_test.test_flexible_top_k.zip │ │ │ ├── gather_ranges_op_test.test_gather_ranges.zip │ │ │ ├── index_hash_ops_test.test_index_hash_ops.zip │ │ │ ├── reduction_ops_test.test_elementwise_sum.zip │ │ │ ├── sequence_ops_test.test_remove_data_blocks.zip │ │ │ ├── softmax_ops_test.test_softmax_with_loss.zip │ │ │ ├── string_ops_test.test_string_starts_with.zip │ │ │ ├── utility_ops_test.test_lengths_to_ranges.zip │ │ │ ├── batch_moments_op_test.test_batch_moments_2d.zip │ │ │ ├── channel_stats_op_test.test_channel_stats_2d.zip │ │ │ ├── channel_stats_op_test.test_channel_stats_3d.zip │ │ │ ├── concat_split_op_test.test_split_by_lengths.zip │ │ │ ├── filler_ops_test.test_diagonal_fill_op_float.zip │ │ │ ├── layer_norm_op_test.test_layer_norm_grad_op.zip │ │ │ ├── length_split_op_test.test_length_split_edge.zip │ │ │ ├── momentum_sgd_test.test_sparse_momentum_sgd.zip │ │ │ ├── pack_ops_test.test_pack_with_max_length_ops.zip │ │ │ ├── reduction_ops_test.test_elementwise_int_sum.zip │ │ │ ├── reduction_ops_test.test_elementwise_sqrsum.zip │ │ │ ├── sequence_ops_test.test_reverse_packed_segs.zip │ │ │ ├── utility_ops_test.test_elementwise_max_grad.zip │ │ │ ├── utility_ops_test.test_elementwise_min_grad.zip │ │ │ ├── affine_channel_op_test.test_affine_channel_2d.zip │ │ │ ├── elementwise_logical_ops_test.test_is_member_of.zip │ │ │ ├── gather_ranges_op_test.test_gather_ranges_split.zip │ │ │ ├── lengths_top_k_ops_test.test_lengths_top_k_op.zip │ │ │ ├── merge_id_lists_op_test.test_merge_id_lists_op.zip │ │ │ ├── one_hot_ops_test.test_batch_bucketized_one_hot.zip │ │ │ ├── sequence_ops_test.test_find_duplicate_elements.zip │ │ │ ├── spatial_bn_op_test.test_spatialbn_test_mode_3d.zip │ │ │ ├── adagrad_test.test_row_wise_sparse_adagrad_empty.zip │ │ │ ├── clip_tensor_op_test.test_clip_tensor_by_scaling.zip │ │ │ ├── integral_image_ops_test.test_integral_image_ops.zip │ │ │ ├── pack_rnn_sequence_op_test.test_pack_rnn_seqence.zip │ │ │ ├── softmax_ops_test.test_spatial_softmax_with_loss.zip │ │ │ └── thresholded_relu_op_test.test_thresholded_relu_1.zip │ ├── convert.py │ └── build.py ├── quantization │ ├── __init__.py │ └── server │ │ └── __init__.py ├── unexported_symbols.lds ├── requirements.txt ├── version_script.lds ├── mobile │ └── contrib │ │ ├── ios │ │ └── ios_caffe_defines.h │ │ └── snpe │ │ └── CMakeLists.txt ├── opt │ └── custom │ │ └── test_cc_amcr_net.pb ├── share │ └── contrib │ │ └── zstd │ │ └── CMakeLists.txt ├── utils │ ├── proto_convert.cc │ └── cpuid_test.cc ├── onnx │ ├── torch_ops │ │ └── CMakeLists.txt │ └── onnxifi_init.h ├── operators │ ├── shape_op_gpu.cc │ ├── data_couple_gpu.cu │ ├── free_op_gpu.cc │ ├── assert_op.cu │ ├── zero_gradient_op_gpu.cc │ ├── do_op_gpu.cc │ ├── if_op_gpu.cc │ ├── matmul_op_gpu.cc │ ├── unsafe_coalesce.cu │ ├── accumulate_op.cu │ ├── lengths_pad_op.cu │ ├── quantized │ │ └── int8_conv_op_relu.cc │ ├── stop_gradient_gpu.cc │ └── while_op_gpu.cc ├── db │ └── create_db_op_gpu.cc ├── transforms │ └── conv_to_nnpack_transform.cc └── sgd │ └── learning_rate_op_gpu.cc ├── test ├── delete.py ├── cpp │ ├── __init__.py │ ├── jit │ │ ├── __init__.py │ │ ├── script_module_v4.ptl │ │ ├── script_module_v5.ptl │ │ ├── script_module_v6.ptl │ │ └── test_interpreter_async.pt │ ├── lite_interpreter_runtime │ │ ├── sequence.ptl │ │ ├── light_model.ptl │ │ ├── delegate_test.ptl │ │ ├── to_be_profiled_module.ptl │ │ └── delegated_submodule_with_debug_info.ptl │ └── api │ │ └── support.cpp ├── expect │ ├── __init__.py │ ├── TestScript.test_string_print-stdout.expect │ ├── TestTorch.test_is_nonzero-empty.expect │ ├── TestScript.test_torch_dot_tensor_annotation.expect │ ├── TestTorch.test_is_nonzero-multiple.expect │ ├── TestScript.test_parser_type_annotations.expect │ ├── TestJit.test_cu_escaped_number.expect │ ├── TestScript.test_format-stdout.expect │ ├── TestScript.test_annotated_script_method.expect │ ├── TestScript.test_parser_type_annotations_comment.expect │ ├── TestScript.test_annotated_script_fn.expect │ ├── TestScript.test_print-stdout.expect │ ├── TestScript.test_python_frontend_py2.expect │ ├── TestJit.test_pretty_printer-python_op_name_test.expect │ ├── TestJit.test_pretty_printer-empty_float_list_test.expect │ ├── TestJit.test_pretty_printer-print_weird_test.expect │ ├── TestJit.test_import_method.expect │ ├── TestJit.test_non_ascii_string.expect │ ├── TestJit.test_pretty_printer-empty_int_list_test.expect │ ├── TestAutograd.test_function-x_grad_desc.expect │ ├── TestJit.test_pretty_printer-if_one.expect │ ├── TestJit.test_pretty_printer-if_test.expect │ └── TestAutograd.test_function-y_grad_desc.expect ├── jit │ ├── __init__.py │ ├── _imported_class_test │ │ ├── __init__.py │ │ └── very │ │ │ ├── __init__.py │ │ │ └── very │ │ │ └── __init__.py │ └── fixtures │ │ ├── test_versioned_div_tensor_v3.pt │ │ ├── _test_serialization_subcmul_v2.pt │ │ ├── test_versioned_div_scalar_int_v3.pt │ │ ├── test_versioned_div_tensor_out_v3.pt │ │ ├── test_versioned_full_preserved_v4.pt │ │ ├── test_versioned_div_scalar_float_v3.pt │ │ ├── test_versioned_div_scalar_scalar_v3.pt │ │ ├── test_versioned_div_tensor_inplace_v3.pt │ │ ├── test_versioned_full_integer_value_v4.pt │ │ ├── test_versioned_div_scalar_inplace_int_v3.pt │ │ ├── test_versioned_div_scalar_inplace_float_v3.pt │ │ ├── test_versioned_div_scalar_reciprocal_int_v3.pt │ │ └── test_versioned_div_scalar_reciprocal_float_v3.pt ├── package │ ├── __init__.py │ ├── module_a.py │ ├── package_b │ │ └── subpackage_0 │ │ │ ├── __init__.py │ │ │ └── subsubpackage_0 │ │ │ └── __init__.py │ ├── package_a │ │ ├── use_torch_package_importer.py │ │ ├── subpackage.py │ │ ├── test_all_leaf_modules_tracer.py │ │ └── use_dunder_package.py │ └── test_trace_dep │ │ └── __init__.py ├── cpp_api_parity │ └── __init__.py ├── quantization │ ├── __init__.py │ ├── bc │ │ └── __init__.py │ ├── fx │ │ └── __init__.py │ ├── jit │ │ └── __init__.py │ ├── core │ │ └── __init__.py │ ├── eager │ │ └── __init__.py │ ├── ao_migration │ │ └── __init__.py │ └── serialized │ │ ├── TestSerialization.test_lstm.input.pt │ │ ├── TestSerialization.test_lstm.traced.pt │ │ ├── TestSerialization.test_conv2d.input.pt │ │ ├── TestSerialization.test_conv2d.traced.pt │ │ ├── TestSerialization.test_conv3d.input.pt │ │ ├── TestSerialization.test_conv3d.traced.pt │ │ ├── TestSerialization.test_linear.input.pt │ │ ├── TestSerialization.test_linear.traced.pt │ │ ├── TestSerialization.test_lstm.expected.pt │ │ ├── TestSerialization.test_lstm.scripted.pt │ │ ├── TestSerialization.test_conv2d.expected.pt │ │ ├── TestSerialization.test_conv2d.scripted.pt │ │ ├── TestSerialization.test_conv3d.expected.pt │ │ ├── TestSerialization.test_conv3d.scripted.pt │ │ ├── TestSerialization.test_linear.expected.pt │ │ ├── TestSerialization.test_linear.scripted.pt │ │ ├── TestSerialization.test_lstm.state_dict.pt │ │ ├── TestSerialization.test_conv2d.state_dict.pt │ │ ├── TestSerialization.test_conv2d_graph.input.pt │ │ ├── TestSerialization.test_conv2d_graph.traced.pt │ │ ├── TestSerialization.test_conv2d_nobias.input.pt │ │ ├── TestSerialization.test_conv2d_relu.input.pt │ │ ├── TestSerialization.test_conv2d_relu.traced.pt │ │ ├── TestSerialization.test_conv3d.state_dict.pt │ │ ├── TestSerialization.test_conv3d_relu.input.pt │ │ ├── TestSerialization.test_conv3d_relu.traced.pt │ │ ├── TestSerialization.test_linear.state_dict.pt │ │ ├── TestSerialization.test_linear_relu.input.pt │ │ ├── TestSerialization.test_linear_relu.traced.pt │ │ ├── TestSerialization.test_conv2d_graph.expected.pt │ │ ├── TestSerialization.test_conv2d_graph.scripted.pt │ │ ├── TestSerialization.test_conv2d_graph_v2.input.pt │ │ ├── TestSerialization.test_conv2d_graph_v3.input.pt │ │ ├── TestSerialization.test_conv2d_nobias.traced.pt │ │ ├── TestSerialization.test_conv2d_relu.expected.pt │ │ ├── TestSerialization.test_conv2d_relu.scripted.pt │ │ ├── TestSerialization.test_conv3d_relu.expected.pt │ │ ├── TestSerialization.test_conv3d_relu.scripted.pt │ │ ├── TestSerialization.test_linear_relu.expected.pt │ │ ├── TestSerialization.test_linear_relu.scripted.pt │ │ ├── TestSerialization.test_conv2d_graph_v2.expected.pt │ │ ├── TestSerialization.test_conv2d_graph_v2.scripted.pt │ │ ├── TestSerialization.test_conv2d_graph_v2.traced.pt │ │ ├── TestSerialization.test_conv2d_graph_v3.expected.pt │ │ ├── TestSerialization.test_conv2d_graph_v3.scripted.pt │ │ ├── TestSerialization.test_conv2d_graph_v3.traced.pt │ │ ├── TestSerialization.test_conv2d_nobias.expected.pt │ │ ├── TestSerialization.test_conv2d_nobias.scripted.pt │ │ ├── TestSerialization.test_conv2d_nobias.state_dict.pt │ │ ├── TestSerialization.test_conv2d_relu.state_dict.pt │ │ ├── TestSerialization.test_conv3d_relu.state_dict.pt │ │ ├── TestSerialization.test_linear_relu.state_dict.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph.input.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph.traced.pt │ │ ├── TestSerialization.test_default_qat_qconfig.input.pt │ │ ├── TestSerialization.test_linear_dynamic_qint8.input.pt │ │ ├── TestSerialization.test_per_channel_observer.input.pt │ │ ├── TestSerialization.test_per_tensor_observer.input.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph.expected.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph.scripted.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v2.input.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v2.traced.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v3.input.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v3.traced.pt │ │ ├── TestSerialization.test_default_qat_qconfig.expected.pt │ │ ├── TestSerialization.test_linear_dynamic_float16.input.pt │ │ ├── TestSerialization.test_linear_dynamic_float16.traced.pt │ │ ├── TestSerialization.test_linear_dynamic_qint8.expected.pt │ │ ├── TestSerialization.test_linear_dynamic_qint8.scripted.pt │ │ ├── TestSerialization.test_linear_dynamic_qint8.traced.pt │ │ ├── TestSerialization.test_per_channel_observer.expected.pt │ │ ├── TestSerialization.test_per_tensor_observer.expected.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v2.expected.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v2.scripted.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v3.expected.pt │ │ ├── TestSerialization.test_conv2d_nobias_graph_v3.scripted.pt │ │ ├── TestSerialization.test_default_qat_qconfig.state_dict.pt │ │ ├── TestSerialization.test_linear_dynamic_float16.expected.pt │ │ ├── TestSerialization.test_linear_dynamic_float16.scripted.pt │ │ ├── TestSerialization.test_linear_dynamic_qint8.state_dict.pt │ │ ├── TestSerialization.test_per_channel_observer.state_dict.pt │ │ ├── TestSerialization.test_per_tensor_observer.state_dict.pt │ │ └── TestSerialization.test_linear_dynamic_float16.state_dict.pt ├── distributed │ └── nn │ │ └── jit │ │ └── __init__.py ├── cpp_extensions │ ├── torch_test_cpp_extension │ │ └── __init__.py │ ├── no_python_abi_suffix_test │ │ └── no_python_abi_suffix_test.cpp │ └── jit_extension2.cpp ├── mobile │ ├── op_deps │ │ └── quantized_ops.h │ └── custom_build │ │ └── expected_output.txt ├── test_img │ └── p1.jpg ├── onnx │ ├── assets │ │ ├── rgb_pytorch.png │ │ └── grace_hopper_517x606.jpg │ └── model_defs │ │ └── __init__.py ├── bottleneck_test │ └── test.py ├── fx │ └── named_tup.py ├── test_jit_fuser_legacy.py └── typing │ └── fail │ ├── random.py │ └── bitwise_ops.py ├── third_party ├── BUILD ├── tensorflow_cuda_bazel_build │ ├── BUILD │ └── WORKSPACE ├── README.md ├── miniz-2.0.8 │ └── BUILD.bazel └── mkl_headers.BUILD ├── tools ├── __init__.py ├── rules │ ├── BUILD │ └── cu.bzl ├── jit │ ├── __init__.py │ └── templates │ │ └── aten_schema_declarations.cpp ├── pyi │ └── __init__.py ├── stats │ └── __init__.py ├── autograd │ ├── __init__.py │ └── README.md ├── codegen │ ├── __init__.py │ ├── api │ │ └── __init__.py │ └── selective_build │ │ └── __init__.py ├── linter │ ├── __init__.py │ ├── install │ │ ├── __init__.py │ │ └── hashes │ │ │ ├── clang-tidy-macos │ │ │ └── clang-tidy-linux64 │ ├── clang_tidy │ │ ├── __init__.py │ │ └── requirements.txt │ └── run_shellcheck.sh ├── testing │ └── __init__.py ├── lite_interpreter │ └── __init__.py ├── code_coverage │ └── package │ │ ├── __init__.py │ │ ├── oss │ │ └── __init__.py │ │ ├── tool │ │ ├── __init__.py │ │ └── parser │ │ │ └── __init__.py │ │ └── util │ │ └── __init__.py ├── coverage_plugins_package │ ├── src │ │ └── coverage_plugins │ │ │ └── __init__.py │ └── pyproject.toml ├── clang_format_hash │ ├── mac │ │ └── clang-format-mojave │ └── linux64 │ │ └── clang-format-linux64 ├── generated_dirs.txt └── shared │ └── __init__.py ├── torch ├── csrc │ ├── empty.c │ ├── deploy │ │ ├── .gitignore │ │ ├── example │ │ │ ├── simple.pt │ │ │ └── fx │ │ │ │ └── some_dependency.py │ │ └── interpreter │ │ │ ├── hide_symbols.script │ │ │ └── third_party │ │ │ └── README.md │ ├── jit │ │ ├── codegen │ │ │ └── cuda │ │ │ │ ├── docs │ │ │ │ ├── .gitignore │ │ │ │ └── images │ │ │ │ │ └── ir_architecture.png │ │ │ │ └── ops │ │ │ │ └── all_ops.h │ │ ├── mobile │ │ │ └── type_parser.h │ │ ├── frontend │ │ │ └── parser_constants.h │ │ ├── python │ │ │ └── init.h │ │ └── passes │ │ │ └── batch_mm.h │ ├── api │ │ ├── src │ │ │ └── nn │ │ │ │ └── options │ │ │ │ ├── vision.cpp │ │ │ │ └── dropout.cpp │ │ └── include │ │ │ └── torch │ │ │ ├── serialize │ │ │ └── archive.h │ │ │ ├── nn │ │ │ └── utils.h │ │ │ ├── torch.h │ │ │ └── autograd.h │ ├── utils │ │ ├── python_stub.h │ │ ├── variadic.cpp │ │ ├── disallow_copy.h │ │ ├── tensor_layouts.h │ │ ├── tensor_memoryformats.h │ │ └── structseq.h │ ├── StorageDefs.h │ ├── Module.h │ ├── autograd │ │ ├── profiler.h │ │ ├── python_fft_functions.h │ │ ├── python_nn_functions.h │ │ ├── python_linalg_functions.h │ │ └── python_special_functions.h │ ├── cuda │ │ ├── python_comm.h │ │ └── device_set.h │ ├── fx │ │ └── fx_init.h │ ├── WindowsTorchApiMacro.h │ ├── onnx │ │ └── init.h │ └── distributed │ │ └── c10d │ │ └── frontend_cuda.hpp ├── py.typed ├── ao │ ├── ns │ │ ├── __init__.py │ │ └── fx │ │ │ └── __init__.py │ ├── sparsity │ │ ├── experimental │ │ │ ├── __init__.py │ │ │ └── pruner │ │ │ │ ├── __init__.py │ │ │ │ └── images │ │ │ │ ├── prune_1.png │ │ │ │ ├── prune_2.png │ │ │ │ ├── prune_3.png │ │ │ │ └── prune_4.png │ │ ├── scheduler │ │ │ └── __init__.py │ │ └── sparsifier │ │ │ └── __init__.py │ ├── nn │ │ ├── __init__.py │ │ └── sparse │ │ │ ├── __init__.py │ │ │ └── quantized │ │ │ └── dynamic │ │ │ └── __init__.py │ └── __init__.py ├── cuda │ ├── error.py │ ├── sparse.py │ └── amp │ │ ├── __init__.py │ │ └── common.py ├── contrib │ └── __init__.py ├── backends │ ├── _nnapi │ │ └── __init__.py │ ├── _coreml │ │ └── __init__.py │ ├── mkl │ │ └── __init__.py │ └── openmp │ │ └── __init__.py ├── fx │ └── experimental │ │ ├── __init__.py │ │ ├── fx_acc │ │ └── __init__.py │ │ ├── fx2trt │ │ ├── __init__.py │ │ └── tools │ │ │ └── __init__.py │ │ └── unification │ │ ├── multipledispatch │ │ └── __init__.py │ │ └── __init__.py ├── nn │ ├── backends │ │ ├── __init__.py │ │ └── thnn.py │ ├── qat │ │ ├── __init__.py │ │ └── modules │ │ │ └── __init__.py │ ├── intrinsic │ │ ├── __init__.py │ │ ├── qat │ │ │ └── __init__.py │ │ └── quantized │ │ │ ├── __init__.py │ │ │ └── dynamic │ │ │ ├── __init__.py │ │ │ └── modules │ │ │ └── __init__.py │ ├── quantizable │ │ ├── __init__.py │ │ └── modules │ │ │ └── __init__.py │ ├── quantized │ │ ├── __init__.py │ │ ├── _reference │ │ │ ├── __init__.py │ │ │ └── modules │ │ │ │ └── __init__.py │ │ └── dynamic │ │ │ └── __init__.py │ └── parallel │ │ └── common_types.pyi ├── distributed │ ├── nn │ │ ├── api │ │ │ └── __init__.py │ │ ├── jit │ │ │ ├── __init__.py │ │ │ └── templates │ │ │ │ └── __init__.py │ │ └── __init__.py │ ├── pipeline │ │ └── __init__.py │ ├── elastic │ │ └── agent │ │ │ └── __init__.py │ ├── algorithms │ │ ├── model_averaging │ │ │ └── __init__.py │ │ └── __init__.py │ ├── _sharded_tensor │ │ └── ops │ │ │ └── __init__.py │ └── _sharding_spec │ │ └── __init__.py ├── testing │ ├── _internal │ │ ├── __init__.py │ │ ├── codegen │ │ │ └── __init__.py │ │ ├── data │ │ │ ├── __init__.py │ │ │ └── network1.py │ │ ├── distributed │ │ │ ├── __init__.py │ │ │ ├── nn │ │ │ │ ├── __init__.py │ │ │ │ └── api │ │ │ │ │ └── __init__.py │ │ │ ├── rpc │ │ │ │ ├── __init__.py │ │ │ │ ├── jit │ │ │ │ │ └── __init__.py │ │ │ │ └── examples │ │ │ │ │ └── __init__.py │ │ │ └── pipeline │ │ │ │ └── __init__.py │ │ ├── generated │ │ │ └── __init__.py │ │ └── test_module │ │ │ ├── __init__.py │ │ │ ├── future_div.py │ │ │ └── no_future_div.py │ └── __init__.py ├── utils │ ├── bottleneck │ │ └── __init__.py │ ├── benchmark │ │ ├── examples │ │ │ └── __init__.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ └── valgrind_wrapper │ │ │ │ └── __init__.py │ │ └── op_fuzzers │ │ │ └── __init__.py │ ├── data │ │ ├── datapipes │ │ │ ├── utils │ │ │ │ └── __init__.py │ │ │ └── __init__.py │ │ └── communication │ │ │ └── __init__.py │ ├── hipify │ │ ├── version.py │ │ └── __init__.py │ ├── ffi │ │ └── __init__.py │ ├── model_dump │ │ └── __main__.py │ └── model_zoo.py ├── cpu │ ├── __init__.py │ └── amp │ │ └── __init__.py ├── for_onnx │ └── __init__.py ├── autograd │ └── _functions │ │ ├── __init__.py │ │ └── replace.vim ├── deploy.h ├── package │ └── analyze │ │ └── __init__.py ├── legacy │ └── README.md ├── lib │ └── libshm │ │ └── alloc_info.h ├── _C │ └── _nvtx.pyi ├── abi-check.cpp └── extension.h ├── .bazelversion ├── .dockerignore ├── version.txt ├── .circleci ├── cimodel │ ├── __init__.py │ ├── lib │ │ └── __init__.py │ └── data │ │ ├── __init__.py │ │ └── simple │ │ ├── __init__.py │ │ └── util │ │ └── __init__.py ├── .gitignore ├── docker │ ├── ubuntu-rocm │ │ └── .gitignore │ ├── android │ │ └── AndroidManifest.xml │ └── common │ │ ├── install_jni.sh │ │ └── install_lcov.sh └── ecr_gc_docker │ └── requirements.txt ├── aten └── src │ ├── ATen │ ├── cudnn │ │ ├── Exceptions.h │ │ └── Handles.h │ ├── function_wrapper.py │ ├── .gitignore │ ├── native │ │ ├── LegacyBridge.cpp │ │ ├── quantized │ │ │ └── cpu │ │ │ │ └── qnnpack │ │ │ │ ├── wrappers │ │ │ │ ├── dummy.c │ │ │ │ ├── x8lut │ │ │ │ │ └── scalar.c │ │ │ │ ├── sgemm │ │ │ │ │ └── 6x8-psimd.c │ │ │ │ ├── u8lut32norm │ │ │ │ │ └── scalar.c │ │ │ │ ├── requantization │ │ │ │ │ ├── fp32-psimd.c │ │ │ │ │ ├── q31-scalar.c │ │ │ │ │ ├── fp32-scalar.c │ │ │ │ │ ├── gemmlowp-scalar.c │ │ │ │ │ ├── precise-psimd.c │ │ │ │ │ └── precise-scalar.c │ │ │ │ ├── q8gemm_sparse │ │ │ │ │ ├── 4x4-packA-aarch32-neon.S │ │ │ │ │ ├── 8x4-packA-aarch32-neon.S │ │ │ │ │ ├── 8x4-packA-aarch64-neon.S │ │ │ │ │ ├── 4x8c1x4-dq-packedA-aarch32-neon.S │ │ │ │ │ ├── 4x8c8x1-dq-packedA-aarch32-neon.S │ │ │ │ │ ├── 8x8c1x4-dq-packedA-aarch64-neon.S │ │ │ │ │ └── 8x8c8x1-dq-packedA-aarch64-neon.S │ │ │ │ ├── q8conv │ │ │ │ │ └── 4x8-aarch32-neon.S │ │ │ │ └── q8gemm │ │ │ │ │ └── 4x8-aarch32-neon.S │ │ │ │ ├── deps │ │ │ │ └── clog │ │ │ │ │ └── confu.yaml │ │ │ │ └── src │ │ │ │ └── q8gemm_sparse │ │ │ │ └── 8x4c1x4-packed-sse2.h │ │ ├── TensorIterator.h │ │ ├── vulkan │ │ │ └── api │ │ │ │ └── Allocator.cpp │ │ ├── metal │ │ │ └── mpscnn │ │ │ │ └── MPSCNNClampOp.h │ │ └── Unfold2d.cpp │ ├── Dimname.h │ ├── core │ │ ├── Scalar.h │ │ ├── blob.cpp │ │ ├── typeid.h │ │ ├── ScalarType.h │ │ ├── ATenGeneral.cpp │ │ ├── Macros.h │ │ ├── UndefinedTensorImpl.h │ │ ├── ATenGeneral.h │ │ ├── Backtrace.h │ │ ├── BackendSelectFallbackKernel.cpp │ │ ├── README.md │ │ ├── TensorImpl_test.cpp │ │ └── function_schema.cpp │ ├── Formatting.h │ ├── NamedTensor.h │ ├── Device.h │ ├── Layout.h │ ├── ArrayRef.h │ ├── Backend.h │ ├── Scalar.h │ ├── Storage.h │ ├── Backtrace.h │ ├── DimVector.h │ ├── Generator.h │ ├── SmallVector.h │ ├── Tensor.h │ ├── TensorOptions.h │ ├── TensorAccessor.h │ ├── miopen │ │ ├── miopen-wrapper.h │ │ └── Handle.h │ ├── TensorMeta.cpp │ ├── test │ │ └── test_install │ │ │ └── main.cpp │ ├── ScalarType.h │ ├── cpu │ │ └── vec │ │ │ ├── vec.h │ │ │ └── functional.h │ └── templates │ │ └── RegistrationDeclarations.h │ ├── THC │ ├── THCDeviceUtils.cuh │ └── THCAtomics.cuh │ └── TH │ ├── THHalf.h │ ├── THStorage.h │ └── TH.h ├── benchmarks ├── operator_benchmark │ ├── __init__.py │ ├── c2 │ │ └── __init__.py │ ├── common │ │ └── __init__.py │ └── pt │ │ └── __init__.py ├── instruction_counts │ ├── core │ │ └── __init__.py │ ├── worker │ │ └── __init__.py │ ├── definitions │ │ └── __init__.py │ ├── execution │ │ └── __init__.py │ └── applications │ │ └── __init__.py ├── sparse │ ├── __init__.py │ └── dlmc │ │ └── __init__.py ├── cpp │ ├── nvfuser │ │ └── main.cpp │ ├── tensorexpr │ │ └── main.cpp │ └── CMakeLists.txt ├── tensorexpr │ └── nnc.png └── distributed │ └── rpc │ └── parameter_server │ ├── data │ └── __init__.py │ └── models │ └── __init__.py ├── c10 ├── util │ ├── Array.cpp │ ├── C++17.cpp │ ├── LeftRight.cpp │ ├── TypeList.cpp │ ├── TypeTraits.cpp │ ├── intrusive_ptr.cpp │ ├── Metaprogramming.cpp │ ├── python_stub.h │ ├── UniqueVoidPtr.cpp │ └── thread_name.h ├── core │ ├── StorageImpl.cpp │ └── Storage.cpp ├── test │ ├── util │ │ ├── complex_test.cpp │ │ ├── complex_math_test.cpp │ │ └── Macros.h │ └── core │ │ └── StreamGuard_test.cpp └── cuda │ └── test │ └── impl │ └── CUDATest.cpp ├── scripts ├── release_notes │ └── requirements.txt └── add_apache_header.sh ├── ubsan.supp ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── pytorch-probot.yml ├── scripts │ └── report_git_status.sh ├── regenerate.sh └── actionlint.yaml ├── .ctags.d └── pytorch.ctags ├── android ├── test_app │ ├── app │ │ └── src │ │ │ └── main │ │ │ ├── assets │ │ │ └── .gitignore │ │ │ └── res │ │ │ ├── values │ │ │ └── strings.xml │ │ │ └── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ └── .gitignore ├── pytorch_android │ ├── src │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── cpp │ │ │ │ ├── cmake_macros.h │ │ │ │ └── cmake_macros.h.in │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ └── androidTest │ │ │ └── assets │ │ │ └── test.pt │ ├── gradle.properties │ └── host │ │ └── gradle.properties ├── pytorch_android_torchvision │ ├── src │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ └── gradle.properties ├── gradle │ ├── wrapper │ │ └── gradle-wrapper.jar │ └── release.gradle └── .gitignore ├── docs ├── source │ ├── docutils.conf │ ├── _static │ │ ├── css │ │ │ └── jit.css │ │ └── img │ │ │ ├── meshgrid.png │ │ │ ├── rpc_arch.png │ │ │ ├── dynamic_graph.gif │ │ │ ├── nn │ │ │ └── layer_norm.jpg │ │ │ ├── aliastracker_graph.png │ │ │ ├── pytorch-logo-dark.png │ │ │ ├── pytorch-logo-flame.png │ │ │ ├── pt_distributed_arch.png │ │ │ ├── tensor_illustration.png │ │ │ ├── tensorboard │ │ │ ├── add_image.png │ │ │ ├── hier_tags.png │ │ │ ├── add_hparam.png │ │ │ ├── add_images.png │ │ │ ├── add_scalar.png │ │ │ ├── add_scalars.png │ │ │ ├── add_histogram.png │ │ │ └── add_histogram_raw.png │ │ │ ├── pipeline_parallelism │ │ │ ├── pipe.png │ │ │ └── no_pipe.png │ │ │ ├── pytorch-logo-dark-unstable.png │ │ │ └── distributed_autograd │ │ │ ├── local_dependencies.png │ │ │ ├── send_recv_functions.png │ │ │ ├── distributed_dependencies.png │ │ │ └── distributed_dependencies_computed.png │ ├── elastic │ │ ├── agent_diagram.jpg │ │ ├── etcd_rdzv_diagram.png │ │ ├── run.rst │ │ └── examples.rst │ ├── math-quantizer-equation.png │ ├── random.rst │ ├── dlpack.rst │ ├── model_zoo.rst │ ├── __config__.rst │ └── distributed.optim.rst ├── .gitignore ├── caffe2 │ └── Caffe2-with-name-55-tall.png ├── README.md └── cpp │ └── requirements.txt ├── ios ├── TestApp │ ├── Gemfile │ ├── .gitignore │ ├── TestApp │ │ ├── ViewController.h │ │ ├── Assets.xcassets │ │ │ └── Contents.json │ │ ├── ViewController.mm │ │ └── AppDelegate.h │ └── fastlane │ │ └── Scanfile ├── LibTorch.h └── LibTorch-Lite.h ├── submodules └── nervanagpu-rev.txt ├── .vscode └── extensions.json ├── .jenkins └── pytorch │ ├── fake_numpy │ └── numpy.py │ ├── .shellcheckrc │ └── win-test-helpers │ └── choose_runtime_cuda_version.bat ├── .isort.cfg ├── .gitattributes └── modules └── observers └── macros.h /caffe2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/delete.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_party/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/rules/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/csrc/empty.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.bazelversion: -------------------------------------------------------------------------------- 1 | 4.2.1 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .gitignore -------------------------------------------------------------------------------- /caffe2/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cpp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/expect/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/pyi/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/stats/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/ns/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/cuda/error.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cpp/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/package/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/autograd/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/codegen/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/linter/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/testing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/ns/fx/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 1.11.0a0 2 | -------------------------------------------------------------------------------- /.circleci/cimodel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.circleci/cimodel/lib/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aten/src/ATen/cudnn/Exceptions.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aten/src/ATen/function_wrapper.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/VERSION_NUMBER: -------------------------------------------------------------------------------- 1 | 0.8.2 2 | -------------------------------------------------------------------------------- /caffe2/contrib/aten/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/gloo/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/nccl/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/nnpack/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/prof/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/script/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/distributed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/experiments/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/perfkernels/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/docs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/helpers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/ideep/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/mint/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/mkl/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/onnx/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/rnn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/trt/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/quantization/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/cpp_api_parity/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/bc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/fx/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/codegen/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/linter/install/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/backends/_nnapi/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/fx/experimental/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/nn/backends/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.circleci/cimodel/data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aten/src/ATen/.gitignore: -------------------------------------------------------------------------------- 1 | Config.h 2 | -------------------------------------------------------------------------------- /aten/src/ATen/native/LegacyBridge.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/aten/docs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/playground/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/tensorboard/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/warpctc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/core/nomnigraph/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/experiments/python/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/examples/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/fakelowp/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/modeling/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/onnx/bin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/onnx/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/predictor/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/quantization/server/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/distributed/nn/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/eager/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/linter/clang_tidy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/lite_interpreter/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/backends/_coreml/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/distributed/nn/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/distributed/nn/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/distributed/pipeline/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/bottleneck/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.circleci/.gitignore: -------------------------------------------------------------------------------- 1 | *.svg 2 | *.png 3 | -------------------------------------------------------------------------------- /.circleci/cimodel/data/simple/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/operator_benchmark/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/script/examples/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/models/seq2seq/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/operator_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/unexported_symbols.lds: -------------------------------------------------------------------------------- 1 | *4llvm* 2 | -------------------------------------------------------------------------------- /test/jit/_imported_class_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/quantization/ao_migration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/code_coverage/package/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/code_coverage/package/oss/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/codegen/selective_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/sparsity/scheduler/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/sparsity/sparsifier/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/cpu/__init__.py: -------------------------------------------------------------------------------- 1 | from . import amp 2 | -------------------------------------------------------------------------------- /torch/distributed/elastic/agent/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/fx/experimental/fx_acc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/codegen/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/data/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/benchmark/examples/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/benchmark/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.circleci/cimodel/data/simple/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.circleci/docker/ubuntu-rocm/.gitignore: -------------------------------------------------------------------------------- 1 | *.sh 2 | -------------------------------------------------------------------------------- /benchmarks/instruction_counts/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/instruction_counts/worker/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/operator_benchmark/c2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/operator_benchmark/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/operator_benchmark/pt/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /caffe2/contrib/playground/resnetdemo/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/jit/_imported_class_test/very/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/package/module_a.py: -------------------------------------------------------------------------------- 1 | result = "module_a" 2 | -------------------------------------------------------------------------------- /third_party/tensorflow_cuda_bazel_build/BUILD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/code_coverage/package/tool/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/code_coverage/package/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/distributed/nn/jit/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/generated/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/test_module/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/benchmark/op_fuzzers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/data/datapipes/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/instruction_counts/definitions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /benchmarks/instruction_counts/execution/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /c10/util/Array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /c10/util/C++17.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /caffe2/core/numa.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/numa.h" 2 | -------------------------------------------------------------------------------- /scripts/release_notes/requirements.txt: -------------------------------------------------------------------------------- 1 | PyGithub 2 | -------------------------------------------------------------------------------- /test/jit/_imported_class_test/very/very/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/code_coverage/package/tool/parser/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/pruner/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/csrc/deploy/.gitignore: -------------------------------------------------------------------------------- 1 | example/generated/* 2 | -------------------------------------------------------------------------------- /torch/csrc/jit/codegen/cuda/docs/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/nn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/rpc/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aten/src/ATen/Dimname.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /benchmarks/instruction_counts/applications/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /c10/util/LeftRight.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /c10/util/TypeList.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /test/cpp_extensions/torch_test_cpp_extension/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/ao/nn/__init__.py: -------------------------------------------------------------------------------- 1 | from torch.ao.nn import sparse 2 | -------------------------------------------------------------------------------- /torch/ao/nn/sparse/__init__.py: -------------------------------------------------------------------------------- 1 | from . import quantized 2 | -------------------------------------------------------------------------------- /torch/distributed/algorithms/model_averaging/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/nn/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/pipeline/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/rpc/jit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/benchmark/utils/valgrind_wrapper/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch/utils/hipify/version.py: -------------------------------------------------------------------------------- 1 | __version__ = '1.0.0' 2 | -------------------------------------------------------------------------------- /ubsan.supp: -------------------------------------------------------------------------------- 1 | vptr:libtorch_python.so 2 | vptr:test_jit 3 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes #{issue number} 2 | -------------------------------------------------------------------------------- /aten/src/ATen/core/Scalar.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /aten/src/ATen/core/blob.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /aten/src/ATen/core/typeid.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/dummy.c: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /c10/core/StorageImpl.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /c10/util/TypeTraits.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /caffe2/core/allocator.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/allocator.h" 2 | -------------------------------------------------------------------------------- /caffe2/python/examples/resnet50_trainer.py: -------------------------------------------------------------------------------- 1 | imagenet_trainer.py -------------------------------------------------------------------------------- /tools/coverage_plugins_package/src/coverage_plugins/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/linter/clang_tidy/requirements.txt: -------------------------------------------------------------------------------- 1 | unidiff==0.6.0 2 | -------------------------------------------------------------------------------- /torch/testing/_internal/distributed/rpc/examples/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.ctags.d/pytorch.ctags: -------------------------------------------------------------------------------- 1 | --exclude=build/* 2 | --exclude=include/* 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Formatting.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /aten/src/ATen/NamedTensor.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /aten/src/ATen/core/ScalarType.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /c10/util/intrusive_ptr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /caffe2/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | enum34 3 | pyyaml 4 | requests 5 | -------------------------------------------------------------------------------- /torch/cpu/amp/__init__.py: -------------------------------------------------------------------------------- 1 | from .autocast_mode import autocast 2 | -------------------------------------------------------------------------------- /torch/for_onnx/__init__.py: -------------------------------------------------------------------------------- 1 | from .onnx import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/qat/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/utils/hipify/__init__.py: -------------------------------------------------------------------------------- 1 | from .version import __version__ 2 | -------------------------------------------------------------------------------- /.circleci/ecr_gc_docker/requirements.txt: -------------------------------------------------------------------------------- 1 | boto3 2 | pytz 3 | requests 4 | -------------------------------------------------------------------------------- /aten/src/ATen/Device.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Layout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/core/ATenGeneral.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /c10/util/Metaprogramming.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /torch/nn/intrinsic/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/quantizable/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/quantized/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /android/test_app/app/src/main/assets/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | */ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /aten/src/ATen/ArrayRef.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Backend.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Scalar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/Storage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /benchmarks/sparse/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | if __name__ == "__main__": 3 | pass 4 | -------------------------------------------------------------------------------- /caffe2/version_script.lds: -------------------------------------------------------------------------------- 1 | pytorch { 2 | local: 3 | *4llvm*; 4 | }; 5 | -------------------------------------------------------------------------------- /docs/source/docutils.conf: -------------------------------------------------------------------------------- 1 | [html writers] 2 | table_style: colwidths-auto 3 | -------------------------------------------------------------------------------- /ios/TestApp/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | -------------------------------------------------------------------------------- /test/package/package_b/subpackage_0/__init__.py: -------------------------------------------------------------------------------- 1 | result = "subpackage_0" 2 | -------------------------------------------------------------------------------- /torch/autograd/_functions/__init__.py: -------------------------------------------------------------------------------- 1 | from .tensor import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/deploy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /torch/nn/intrinsic/qat/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /aten/src/ATen/Backtrace.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/DimVector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Generator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/SmallVector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/Tensor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/core/Macros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/cudnn/Handles.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /benchmarks/sparse/dlmc/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | if __name__ == "__main__": 3 | pass 4 | -------------------------------------------------------------------------------- /c10/test/util/complex_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /caffe2/contrib/gloo/context.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /torch/ao/__init__.py: -------------------------------------------------------------------------------- 1 | from torch.ao import nn 2 | from torch.ao import sparsity 3 | -------------------------------------------------------------------------------- /torch/csrc/api/src/nn/options/vision.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /torch/nn/intrinsic/quantized/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/quantized/_reference/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/quantized/dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /.circleci/docker/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.github/pytorch-probot.yml: -------------------------------------------------------------------------------- 1 | tracking_issue: 24422 2 | ciflow_tracking_issue: 64124 3 | -------------------------------------------------------------------------------- /aten/src/ATen/TensorOptions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/core/UndefinedTensorImpl.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /caffe2/contrib/aten/aten_op.h: -------------------------------------------------------------------------------- 1 | #include "caffe2/caffe2/contrib/aten/gen_aten_op.h" 2 | -------------------------------------------------------------------------------- /caffe2/python/convert.py: -------------------------------------------------------------------------------- 1 | ## @package workspace 2 | # Module caffe2.python.workspace 3 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | package-lock.json 3 | package.json 4 | yarn.lock 5 | -------------------------------------------------------------------------------- /test/mobile/op_deps/quantized_ops.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /torch/distributed/_sharded_tensor/ops/__init__.py: -------------------------------------------------------------------------------- 1 | from .linear import sharded_linear 2 | -------------------------------------------------------------------------------- /torch/fx/experimental/fx2trt/__init__.py: -------------------------------------------------------------------------------- 1 | from .converters import * # noqa: F403 2 | -------------------------------------------------------------------------------- /android/pytorch_android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /aten/src/ATen/TensorAccessor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /aten/src/ATen/core/ATenGeneral.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/miopen/miopen-wrapper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/TensorIterator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | -------------------------------------------------------------------------------- /ios/TestApp/.gitignore: -------------------------------------------------------------------------------- 1 | model.pt 2 | .config 3 | Podfile.lock 4 | fastlane/test_output/ 5 | -------------------------------------------------------------------------------- /submodules/nervanagpu-rev.txt: -------------------------------------------------------------------------------- 1 | Subproject commit d4eefd50fbd7d34a17dddbc829888835d67b5f4a 2 | -------------------------------------------------------------------------------- /test/expect/TestScript.test_string_print-stdout.expect: -------------------------------------------------------------------------------- 1 | 1 2 | [ CPULongType{} ] abcd 2 1.5 3 | -------------------------------------------------------------------------------- /test/test_img/p1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/test_img/p1.jpg -------------------------------------------------------------------------------- /third_party/tensorflow_cuda_bazel_build/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "local_config_cuda") 2 | -------------------------------------------------------------------------------- /torch/cuda/sparse.py: -------------------------------------------------------------------------------- 1 | # The Tensor classes are added to this module by python_tensor.cpp 2 | -------------------------------------------------------------------------------- /torch/fx/experimental/fx2trt/tools/__init__.py: -------------------------------------------------------------------------------- 1 | from .trt_minimizer import * # noqa: F403 2 | -------------------------------------------------------------------------------- /torch/nn/intrinsic/quantized/dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | from .modules import * # noqa: F403 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-python.python" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /aten/src/ATen/core/Backtrace.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /benchmarks/cpp/nvfuser/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BENCHMARK_MAIN(); 4 | -------------------------------------------------------------------------------- /benchmarks/cpp/tensorexpr/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BENCHMARK_MAIN(); 4 | -------------------------------------------------------------------------------- /c10/core/Storage.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace c10 {} // namespace c10 4 | -------------------------------------------------------------------------------- /c10/util/python_stub.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct _object; 4 | using PyObject = _object; 5 | -------------------------------------------------------------------------------- /test/mobile/custom_build/expected_output.txt: -------------------------------------------------------------------------------- 1 | -0.258 2 | 0.089 3 | -0.470 4 | -0.453 5 | -0.289 6 | -------------------------------------------------------------------------------- /tools/rules/cu.bzl: -------------------------------------------------------------------------------- 1 | # gpu support is not available 2 | def cu_library(**kwargs): 3 | pass 4 | -------------------------------------------------------------------------------- /caffe2/core/numa.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "c10/util/numa.h" 3 | #include "caffe2/core/common.h" 4 | -------------------------------------------------------------------------------- /test/cpp_extensions/no_python_abi_suffix_test/no_python_abi_suffix_test.cpp: -------------------------------------------------------------------------------- 1 | void dummy(int) { } 2 | -------------------------------------------------------------------------------- /test/expect/TestTorch.test_is_nonzero-empty.expect: -------------------------------------------------------------------------------- 1 | Boolean value of Tensor with no values is ambiguous -------------------------------------------------------------------------------- /torch/csrc/utils/python_stub.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct _object; 4 | using PyObject = _object; 5 | -------------------------------------------------------------------------------- /android/pytorch_android/src/main/cpp/cmake_macros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /* #undef TRACE_ENABLED */ 4 | -------------------------------------------------------------------------------- /android/pytorch_android/src/main/cpp/cmake_macros.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #cmakedefine TRACE_ENABLED 4 | -------------------------------------------------------------------------------- /benchmarks/tensorexpr/nnc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/benchmarks/tensorexpr/nnc.png -------------------------------------------------------------------------------- /caffe2/contrib/fakelowp/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace caffe2 { 4 | 5 | } // namespace caffe2 6 | -------------------------------------------------------------------------------- /caffe2/core/logging.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "c10/util/Logging.h" 3 | #include "caffe2/core/common.h" 4 | -------------------------------------------------------------------------------- /third_party/README.md: -------------------------------------------------------------------------------- 1 | This folder contains vendored copies of third-party libraries that we 2 | use. 3 | -------------------------------------------------------------------------------- /torch/package/analyze/__init__.py: -------------------------------------------------------------------------------- 1 | from .trace_dependencies import ( 2 | trace_dependencies, 3 | ) 4 | -------------------------------------------------------------------------------- /aten/src/ATen/TensorMeta.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace at { 4 | 5 | } // namespace at 6 | -------------------------------------------------------------------------------- /caffe2/core/flags.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "c10/util/Flags.h" 4 | #include "caffe2/core/common.h" 5 | -------------------------------------------------------------------------------- /ios/LibTorch.h: -------------------------------------------------------------------------------- 1 | #ifndef LibTorch_h 2 | #define LibTorch_h 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /tools/clang_format_hash/mac/clang-format-mojave: -------------------------------------------------------------------------------- 1 | 5fde7bccf65032da297dfb1f18e4a95e96e278fa397e9dcaf364dfe23ec46353 -------------------------------------------------------------------------------- /tools/generated_dirs.txt: -------------------------------------------------------------------------------- 1 | torch/csrc/autograd/generated/ 2 | torch/csrc/jit/generated/ 3 | build/aten/src/ATen 4 | -------------------------------------------------------------------------------- /tools/linter/install/hashes/clang-tidy-macos: -------------------------------------------------------------------------------- 1 | 541797a7b8fa795e2f3c1adcd8236cc336a40aa927028dc5bc79172e1d9eca36 2 | -------------------------------------------------------------------------------- /torch/csrc/utils/variadic.cpp: -------------------------------------------------------------------------------- 1 | // Intentionally blank so I get a compile_commands.json entry for the header 2 | -------------------------------------------------------------------------------- /torch/legacy/README.md: -------------------------------------------------------------------------------- 1 | If you're looking for this legacy code please consider versions of PyTorch before 0.5 2 | -------------------------------------------------------------------------------- /torch/utils/data/datapipes/__init__.py: -------------------------------------------------------------------------------- 1 | from . import iter 2 | from . import map 3 | from . import dataframe 4 | -------------------------------------------------------------------------------- /android/pytorch_android_torchvision/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /caffe2/mobile/contrib/ios/ios_caffe_defines.h: -------------------------------------------------------------------------------- 1 | 2 | #define IOS_CAFFE_EXPORT __attribute__((visibility("default"))) 3 | -------------------------------------------------------------------------------- /scripts/add_apache_header.sh: -------------------------------------------------------------------------------- 1 | cat apache_header.txt $1 > _add_apache_header.txt && mv _add_apache_header.txt $1 2 | -------------------------------------------------------------------------------- /test/cpp/jit/script_module_v4.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/jit/script_module_v4.ptl -------------------------------------------------------------------------------- /test/cpp/jit/script_module_v5.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/jit/script_module_v5.ptl -------------------------------------------------------------------------------- /test/cpp/jit/script_module_v6.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/jit/script_module_v6.ptl -------------------------------------------------------------------------------- /test/expect/TestScript.test_torch_dot_tensor_annotation.expect: -------------------------------------------------------------------------------- 1 | foo(Tensor x, (Tensor, Tensor) y) -> (Tensor, Tensor) -------------------------------------------------------------------------------- /test/expect/TestTorch.test_is_nonzero-multiple.expect: -------------------------------------------------------------------------------- 1 | Boolean value of Tensor with more than one value is ambiguous -------------------------------------------------------------------------------- /test/onnx/assets/rgb_pytorch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/onnx/assets/rgb_pytorch.png -------------------------------------------------------------------------------- /tools/clang_format_hash/linux64/clang-format-linux64: -------------------------------------------------------------------------------- 1 | 21ca53c291a88b53dac85751b7a0203ca610ac94b7adaff3c092cf30df4168f2 -------------------------------------------------------------------------------- /tools/linter/install/hashes/clang-tidy-linux64: -------------------------------------------------------------------------------- 1 | 49343a448fcb75cd1e0fb9d6b1f6c2ef4b008b6f91d6ff899d4ac6060f5e52a5 2 | -------------------------------------------------------------------------------- /torch/csrc/StorageDefs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | struct THPStorage { 3 | PyObject_HEAD 4 | THWStorage *cdata; 5 | }; 6 | -------------------------------------------------------------------------------- /torch/utils/ffi/__init__.py: -------------------------------------------------------------------------------- 1 | raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.") 2 | -------------------------------------------------------------------------------- /.jenkins/pytorch/fake_numpy/numpy.py: -------------------------------------------------------------------------------- 1 | raise ModuleNotFoundError("Sorry PyTorch, but our NumPy is in the other folder") 2 | -------------------------------------------------------------------------------- /aten/src/THC/THCDeviceUtils.cuh: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // TODO: Remove this header 3 | #include 4 | -------------------------------------------------------------------------------- /docs/source/_static/css/jit.css: -------------------------------------------------------------------------------- 1 | .codeblock-height-limiter { 2 | max-height: 500px; 3 | overflow: scroll; 4 | } 5 | -------------------------------------------------------------------------------- /docs/source/_static/img/meshgrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/meshgrid.png -------------------------------------------------------------------------------- /docs/source/_static/img/rpc_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/rpc_arch.png -------------------------------------------------------------------------------- /test/expect/TestScript.test_parser_type_annotations.expect: -------------------------------------------------------------------------------- 1 | foo(Tensor x, ((Tensor, Tensor), Tensor) y) -> ((Tensor, Tensor)) -------------------------------------------------------------------------------- /torch/csrc/deploy/example/simple.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/csrc/deploy/example/simple.pt -------------------------------------------------------------------------------- /aten/src/ATen/native/vulkan/api/Allocator.cpp: -------------------------------------------------------------------------------- 1 | #define VMA_IMPLEMENTATION 2 | #include 3 | -------------------------------------------------------------------------------- /c10/test/core/StreamGuard_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // At the moment, just make sure it compiles 4 | -------------------------------------------------------------------------------- /caffe2/opt/custom/test_cc_amcr_net.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/opt/custom/test_cc_amcr_net.pb -------------------------------------------------------------------------------- /caffe2/python/trt/data/binoculars.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/trt/data/binoculars.jpeg -------------------------------------------------------------------------------- /docs/source/elastic/agent_diagram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/elastic/agent_diagram.jpg -------------------------------------------------------------------------------- /docs/source/math-quantizer-equation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/math-quantizer-equation.png -------------------------------------------------------------------------------- /test/bottleneck_test/test.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | x = torch.ones((3, 3), requires_grad=True) 4 | (3 * x).sum().backward() 5 | -------------------------------------------------------------------------------- /test/cpp/jit/test_interpreter_async.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/jit/test_interpreter_async.pt -------------------------------------------------------------------------------- /test/expect/TestJit.test_cu_escaped_number.expect: -------------------------------------------------------------------------------- 1 | def foo(a: Tensor) -> NoneType: 2 | print("hi\016") 3 | return None 4 | -------------------------------------------------------------------------------- /test/expect/TestScript.test_format-stdout.expect: -------------------------------------------------------------------------------- 1 | Hello, I'm a test 2 | format blank 3 | stuff before hi 4 | hi stuff after 5 | -------------------------------------------------------------------------------- /torch/ao/nn/sparse/quantized/dynamic/__init__.py: -------------------------------------------------------------------------------- 1 | from .linear import Linear 2 | 3 | __all__ = [ 4 | "Linear", 5 | ] 6 | -------------------------------------------------------------------------------- /torch/csrc/deploy/interpreter/hide_symbols.script: -------------------------------------------------------------------------------- 1 | INTERPRETER_0.1 { 2 | global: newInterpreterImpl; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /torch/distributed/nn/__init__.py: -------------------------------------------------------------------------------- 1 | from .api.remote_module import RemoteModule 2 | from .functional import * # noqa: F403 3 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/test_app/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PyTest 3 | 4 | -------------------------------------------------------------------------------- /caffe2/python/trt/data/reflex_camera.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/trt/data/reflex_camera.jpeg -------------------------------------------------------------------------------- /docs/caffe2/Caffe2-with-name-55-tall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/caffe2/Caffe2-with-name-55-tall.png -------------------------------------------------------------------------------- /docs/source/_static/img/dynamic_graph.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/dynamic_graph.gif -------------------------------------------------------------------------------- /docs/source/_static/img/nn/layer_norm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/nn/layer_norm.jpg -------------------------------------------------------------------------------- /docs/source/elastic/etcd_rdzv_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/elastic/etcd_rdzv_diagram.png -------------------------------------------------------------------------------- /ios/TestApp/TestApp/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ViewController : UIViewController 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /test/expect/TestScript.test_annotated_script_method.expect: -------------------------------------------------------------------------------- 1 | forward( self, (Tensor, Tensor) x, Tensor y) -> ((Tensor, Tensor, Tensor)) -------------------------------------------------------------------------------- /test/expect/TestScript.test_parser_type_annotations_comment.expect: -------------------------------------------------------------------------------- 1 | foo(Tensor x, ((Tensor, Tensor), Tensor) y) -> ((Tensor, Tensor)) -------------------------------------------------------------------------------- /test/onnx/assets/grace_hopper_517x606.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/onnx/assets/grace_hopper_517x606.jpg -------------------------------------------------------------------------------- /torch/distributed/algorithms/__init__.py: -------------------------------------------------------------------------------- 1 | from .join import Join 2 | from .join import Joinable 3 | from .join import JoinHook 4 | -------------------------------------------------------------------------------- /torch/utils/model_dump/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | from . import main 4 | 5 | sys.exit(main(sys.argv)) 6 | -------------------------------------------------------------------------------- /caffe2/core/macros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // This is a placeholder. The real content will be generated by the cmake 4 | // script. 5 | -------------------------------------------------------------------------------- /caffe2/core/qtensor.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/qtensor.h" 2 | 3 | namespace caffe2 { 4 | CAFFE_KNOWN_TYPE(QTensor); 5 | } 6 | -------------------------------------------------------------------------------- /caffe2/python/trt/data/tabby_tiger_cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/trt/data/tabby_tiger_cat.jpg -------------------------------------------------------------------------------- /caffe2/share/contrib/zstd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE tmp *.cc) 2 | set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${tmp} PARENT_SCOPE) 3 | -------------------------------------------------------------------------------- /ios/TestApp/TestApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/expect/TestScript.test_annotated_script_fn.expect: -------------------------------------------------------------------------------- 1 | foo(Tensor x, (Tensor, Tensor, Tensor) y, (Tensor, (Tensor, Tensor)) z) -> (Tensor) -------------------------------------------------------------------------------- /tools/linter/run_shellcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | find "$@" -name '*.sh' -print0 | xargs -0 -n1 shellcheck --external-sources 3 | -------------------------------------------------------------------------------- /.circleci/docker/common/install_jni.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | mkdir -p /usr/local/include 6 | cp jni.h /usr/local/include 7 | -------------------------------------------------------------------------------- /caffe2/distributed/python.pyi: -------------------------------------------------------------------------------- 1 | class StoreHandlerNotAvailableException(Exception): ... 2 | class StoreHandlerTimeoutError(Exception): ... 3 | -------------------------------------------------------------------------------- /docs/source/_static/img/aliastracker_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/aliastracker_graph.png -------------------------------------------------------------------------------- /docs/source/_static/img/pytorch-logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pytorch-logo-dark.png -------------------------------------------------------------------------------- /docs/source/_static/img/pytorch-logo-flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pytorch-logo-flame.png -------------------------------------------------------------------------------- /test/cpp/lite_interpreter_runtime/sequence.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/lite_interpreter_runtime/sequence.ptl -------------------------------------------------------------------------------- /test/expect/TestScript.test_print-stdout.expect: -------------------------------------------------------------------------------- 1 | 0.5000 2 | 0.9526 3 | 0.9975 4 | 0.9999 5 | [ CPUDoubleType{4} ] 1 2 [1, 2] [1., 2.] 6 | -------------------------------------------------------------------------------- /test/expect/TestScript.test_python_frontend_py2.expect: -------------------------------------------------------------------------------- 1 | (def 2 | (ident fn) 3 | (decl (list) (option)) 4 | (list (raise (option)))) 5 | -------------------------------------------------------------------------------- /android/gradle/release.gradle: -------------------------------------------------------------------------------- 1 | apply from: rootProject.file('gradle/android_tasks.gradle') 2 | 3 | apply plugin: 'com.vanniktech.maven.publish' 4 | -------------------------------------------------------------------------------- /android/pytorch_android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | pytorch_android 3 | 4 | -------------------------------------------------------------------------------- /docs/source/_static/img/pt_distributed_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pt_distributed_arch.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensor_illustration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensor_illustration.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_image.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/hier_tags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/hier_tags.png -------------------------------------------------------------------------------- /test/cpp/lite_interpreter_runtime/light_model.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/lite_interpreter_runtime/light_model.ptl -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-python_op_name_test.expect: -------------------------------------------------------------------------------- 1 | def python_op_name_test(y: Tensor) -> Tensor: 2 | return ^python_fn()(y) 3 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_tensor_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_tensor_v3.pt -------------------------------------------------------------------------------- /tools/shared/__init__.py: -------------------------------------------------------------------------------- 1 | from .module_loader import import_module 2 | from .cwrap_common import set_declaration_defaults, sort_by_number_of_args 3 | -------------------------------------------------------------------------------- /torch/csrc/Module.h: -------------------------------------------------------------------------------- 1 | #ifndef THP_MODULE_INC 2 | #define THP_MODULE_INC 3 | 4 | #define THP_STATELESS_ATTRIBUTE_NAME "_torch" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /torch/csrc/deploy/example/fx/some_dependency.py: -------------------------------------------------------------------------------- 1 | # dependency for torch package 2 | 3 | def a_non_torch_leaf(a: int, b): 4 | return a * b 5 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | include_trailing_comma=True 3 | multi_line_output=3 4 | skip=third_party 5 | skip_gitignore=True 6 | use_parentheses=True 7 | -------------------------------------------------------------------------------- /aten/src/TH/THHalf.h: -------------------------------------------------------------------------------- 1 | #ifndef TH_HALF_H 2 | #define TH_HALF_H 3 | 4 | #include 5 | 6 | #define THHalf at::Half 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_hparam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_hparam.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_images.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_scalar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_scalar.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_scalars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_scalars.png -------------------------------------------------------------------------------- /test/cpp/lite_interpreter_runtime/delegate_test.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/lite_interpreter_runtime/delegate_test.ptl -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-empty_float_list_test.expect: -------------------------------------------------------------------------------- 1 | def empty_float_list_test(y: Tensor) -> List[float]: 2 | return [1., 2., 3.] 3 | -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-print_weird_test.expect: -------------------------------------------------------------------------------- 1 | def print_weird_test(y: Tensor) -> NoneType: 2 | print("hi\016") 3 | return None 4 | -------------------------------------------------------------------------------- /test/jit/fixtures/_test_serialization_subcmul_v2.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/_test_serialization_subcmul_v2.pt -------------------------------------------------------------------------------- /test/package/package_a/use_torch_package_importer.py: -------------------------------------------------------------------------------- 1 | try: 2 | import torch_package_importer # noqa: F401 3 | except ImportError: 4 | pass 5 | -------------------------------------------------------------------------------- /torch/utils/model_zoo.py: -------------------------------------------------------------------------------- 1 | # torchvision imports tqdm from here. 2 | from torch.hub import tqdm, load_state_dict_from_url as load_url # noqa: F401 3 | -------------------------------------------------------------------------------- /android/pytorch_android/src/androidTest/assets/test.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/android/pytorch_android/src/androidTest/assets/test.pt -------------------------------------------------------------------------------- /aten/src/THC/THCAtomics.cuh: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // TODO: Remove once torchvision has been updated to use the ATen header 3 | #include 4 | -------------------------------------------------------------------------------- /benchmarks/distributed/rpc/parameter_server/data/__init__.py: -------------------------------------------------------------------------------- 1 | from .DummyData import DummyData 2 | 3 | data_map = { 4 | "DummyData": DummyData 5 | } 6 | -------------------------------------------------------------------------------- /docs/source/_static/img/pipeline_parallelism/pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pipeline_parallelism/pipe.png -------------------------------------------------------------------------------- /docs/source/_static/img/pytorch-logo-dark-unstable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pytorch-logo-dark-unstable.png -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_histogram.png -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_int_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_int_v3.pt -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_tensor_out_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_tensor_out_v3.pt -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_full_preserved_v4.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_full_preserved_v4.pt -------------------------------------------------------------------------------- /torch/csrc/autograd/profiler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | -------------------------------------------------------------------------------- /torch/csrc/utils/disallow_copy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define TH_DISALLOW_COPY_AND_ASSIGN AT_DISALLOW_COPY_AND_ASSIGN 6 | -------------------------------------------------------------------------------- /torch/cuda/amp/__init__.py: -------------------------------------------------------------------------------- 1 | from .autocast_mode import autocast, custom_fwd, custom_bwd # noqa: F401 2 | from .grad_scaler import GradScaler # noqa: F401 3 | -------------------------------------------------------------------------------- /.github/scripts/report_git_status.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | CHANGES=$(git status --porcelain "$1") 3 | echo "$CHANGES" 4 | git diff "$1" 5 | [ -z "$CHANGES" ] 6 | -------------------------------------------------------------------------------- /aten/src/ATen/test/test_install/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | std::cout << at::ones({3,4}, at::CPU(at::kFloat)) << "\n"; 5 | } 6 | -------------------------------------------------------------------------------- /benchmarks/cpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(convolution_bench convolution.cpp) 2 | target_link_libraries(convolution_bench PRIVATE torch_library benchmark) 3 | -------------------------------------------------------------------------------- /benchmarks/distributed/rpc/parameter_server/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .DummyModel import DummyModel 2 | 3 | model_map = { 4 | "DummyModel": DummyModel 5 | } 6 | -------------------------------------------------------------------------------- /docs/source/_static/img/pipeline_parallelism/no_pipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/pipeline_parallelism/no_pipe.png -------------------------------------------------------------------------------- /test/expect/TestJit.test_import_method.expect: -------------------------------------------------------------------------------- 1 | def forward(self, 2 | x: Tensor, 3 | y: Tensor) -> Tensor: 4 | return torch.add(torch.mul(x, 2), y) 5 | -------------------------------------------------------------------------------- /test/expect/TestJit.test_non_ascii_string.expect: -------------------------------------------------------------------------------- 1 | def forward(self, 2 | x: Tensor, 3 | y: Tensor) -> str: 4 | return torch.add(self.a, CONSTANTS.c0) 5 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_float_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_float_v3.pt -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_scalar_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_scalar_v3.pt -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/pruner/images/prune_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/ao/sparsity/experimental/pruner/images/prune_1.png -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/pruner/images/prune_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/ao/sparsity/experimental/pruner/images/prune_2.png -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/pruner/images/prune_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/ao/sparsity/experimental/pruner/images/prune_3.png -------------------------------------------------------------------------------- /torch/ao/sparsity/experimental/pruner/images/prune_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/ao/sparsity/experimental/pruner/images/prune_4.png -------------------------------------------------------------------------------- /torch/nn/backends/thnn.py: -------------------------------------------------------------------------------- 1 | # this is for historical pickle deserilaization, it is not used otherwise 2 | 3 | def _get_thnn_function_backend(): 4 | pass 5 | -------------------------------------------------------------------------------- /torch/nn/intrinsic/quantized/dynamic/modules/__init__.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from .linear_relu import LinearReLU 3 | 4 | __all__ = [ 5 | 'LinearReLU', 6 | ] 7 | -------------------------------------------------------------------------------- /aten/src/TH/THStorage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | // Compatibility header. Use THStorageFunctions.h instead if you need this. 5 | -------------------------------------------------------------------------------- /caffe2/utils/proto_convert.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/utils/proto_convert.h" 2 | #include "caffe2/core/logging.h" 3 | 4 | namespace caffe2 { 5 | } // namespace caffe2 6 | -------------------------------------------------------------------------------- /docs/source/_static/img/tensorboard/add_histogram_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/tensorboard/add_histogram_raw.png -------------------------------------------------------------------------------- /ios/TestApp/TestApp/ViewController.mm: -------------------------------------------------------------------------------- 1 | #import "ViewController.h" 2 | 3 | @interface ViewController () 4 | @end 5 | 6 | @implementation ViewController 7 | @end 8 | -------------------------------------------------------------------------------- /test/cpp/lite_interpreter_runtime/to_be_profiled_module.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/lite_interpreter_runtime/to_be_profiled_module.ptl -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-empty_int_list_test.expect: -------------------------------------------------------------------------------- 1 | def empty_int_list_test(y: Tensor) -> int: 2 | x = annotate(List[int], []) 3 | return x[0] 4 | -------------------------------------------------------------------------------- /test/fx/named_tup.py: -------------------------------------------------------------------------------- 1 | from typing import NamedTuple 2 | 3 | import torch 4 | 5 | class MyNamedTup(NamedTuple): 6 | i : torch.Tensor 7 | f : torch.Tensor 8 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_tensor_inplace_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_tensor_inplace_v3.pt -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_full_integer_value_v4.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_full_integer_value_v4.pt -------------------------------------------------------------------------------- /torch/csrc/api/include/torch/serialize/archive.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | -------------------------------------------------------------------------------- /torch/csrc/deploy/interpreter/third_party/README.md: -------------------------------------------------------------------------------- 1 | Python libraries that we want to package along with the Python implementation 2 | bundled in libinterpreter. 3 | -------------------------------------------------------------------------------- /torch/csrc/jit/codegen/cuda/docs/images/ir_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/torch/csrc/jit/codegen/cuda/docs/images/ir_architecture.png -------------------------------------------------------------------------------- /torch/csrc/utils/tensor_layouts.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace utils { 4 | 5 | void initializeLayouts(); 6 | 7 | }} // namespace torch::utils 8 | -------------------------------------------------------------------------------- /android/pytorch_android_torchvision/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | pytorch_android_torchvision 3 | 4 | -------------------------------------------------------------------------------- /android/test_app/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/android/test_app/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /aten/src/ATen/ScalarType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include // for BC reasons 3 | #include 4 | #include 5 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/x8lut/scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_inplace_int_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_inplace_int_v3.pt -------------------------------------------------------------------------------- /tools/coverage_plugins_package/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = [ 3 | "setuptools>=42", 4 | "wheel" 5 | ] 6 | build-backend = "setuptools.build_meta" 7 | -------------------------------------------------------------------------------- /tools/jit/templates/aten_schema_declarations.cpp: -------------------------------------------------------------------------------- 1 | namespace torch { namespace jit { 2 | const char * schema_declarations = R"===( 3 | ${declarations} 4 | )==="; 5 | }} 6 | -------------------------------------------------------------------------------- /torch/csrc/cuda/python_comm.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace cuda { namespace python { 4 | 5 | void initCommMethods(PyObject *module); 6 | 7 | }}} 8 | -------------------------------------------------------------------------------- /torch/utils/data/communication/__init__.py: -------------------------------------------------------------------------------- 1 | from . import eventloop 2 | from . import iter 3 | from . import messages 4 | from . import protocol 5 | from . import queue 6 | -------------------------------------------------------------------------------- /.jenkins/pytorch/.shellcheckrc: -------------------------------------------------------------------------------- 1 | source-path=SCRIPTDIR 2 | 3 | # we'd like to enable --external-sources here but can't 4 | # https://github.com/koalaman/shellcheck/issues/1818 5 | -------------------------------------------------------------------------------- /android/test_app/.gitignore: -------------------------------------------------------------------------------- 1 | local.properties 2 | **/*.iml 3 | .gradle 4 | gradlew* 5 | gradle/wrapper 6 | .idea/* 7 | .DS_Store 8 | build 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /aten/src/ATen/cpu/vec/vec.h: -------------------------------------------------------------------------------- 1 | #if defined(CPU_CAPABILITY_AVX512) 2 | #include 3 | #else 4 | #include 5 | #endif 6 | -------------------------------------------------------------------------------- /aten/src/ATen/native/metal/mpscnn/MPSCNNClampOp.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface MPSCNNClampOp : NSObject 4 | 5 | @end 6 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/sgemm/6x8-psimd.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /caffe2/core/allocator.h: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE2_CORE_ALLOCATOR_H_ 2 | #define CAFFE2_CORE_ALLOCATOR_H_ 3 | #include 4 | #endif // CAFFE2_CORE_ALLOCATOR_H_ 5 | -------------------------------------------------------------------------------- /docs/source/elastic/run.rst: -------------------------------------------------------------------------------- 1 | .. _launcher-api: 2 | 3 | torchrun (Elastic Launch) 4 | ====================================== 5 | 6 | .. automodule:: torch.distributed.run 7 | -------------------------------------------------------------------------------- /docs/source/random.rst: -------------------------------------------------------------------------------- 1 | torch.random 2 | =================================== 3 | 4 | .. currentmodule:: torch.random 5 | 6 | .. automodule:: torch.random 7 | :members: 8 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_inplace_float_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_inplace_float_v3.pt -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_reciprocal_int_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_reciprocal_int_v3.pt -------------------------------------------------------------------------------- /torch/nn/parallel/common_types.pyi: -------------------------------------------------------------------------------- 1 | from typing import Union, Sequence 2 | from ... import device 3 | 4 | _device_t = Union[int, device] 5 | _devices_t = Sequence[_device_t] 6 | -------------------------------------------------------------------------------- /.github/regenerate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # Allows this script to be invoked from any directory: 4 | cd "$(dirname "$0")" 5 | 6 | python3 scripts/generate_ci_workflows.py 7 | -------------------------------------------------------------------------------- /caffe2/mobile/contrib/snpe/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(USE_SNPE AND ANDROID) 2 | file(GLOB_RECURSE tmp *.cc) 3 | set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${tmp} PARENT_SCOPE) 4 | endif() 5 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Please see the [Writing documentation section of CONTRIBUTING.md](../CONTRIBUTING.md#writing-documentation) 2 | for details on both writing and building the docs. 3 | -------------------------------------------------------------------------------- /test/jit/fixtures/test_versioned_div_scalar_reciprocal_float_v3.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/jit/fixtures/test_versioned_div_scalar_reciprocal_float_v3.pt -------------------------------------------------------------------------------- /test/package/test_trace_dep/__init__.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import yaml 3 | 4 | 5 | class SumMod(torch.nn.Module): 6 | def forward(self, inp): 7 | return torch.sum(inp) 8 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_lstm.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_lstm.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_lstm.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_lstm.traced.pt -------------------------------------------------------------------------------- /tools/autograd/README.md: -------------------------------------------------------------------------------- 1 | If you add a file to this directory, you **MUST** update 2 | `torch/CMakeLists.txt` and add the file as a dependency to 3 | the `add_custom_command` call. 4 | -------------------------------------------------------------------------------- /torch/backends/mkl/__init__.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | 4 | def is_available(): 5 | r"""Returns whether PyTorch is built with MKL support.""" 6 | return torch._C.has_mkl 7 | -------------------------------------------------------------------------------- /torch/csrc/jit/mobile/type_parser.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace c10 { 4 | TORCH_API TypePtr parseType(const std::string& pythonStr); 5 | } // namespace c10 6 | -------------------------------------------------------------------------------- /torch/csrc/utils/tensor_memoryformats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace utils { 4 | 5 | void initializeMemoryFormats(); 6 | 7 | }} // namespace torch::utils 8 | -------------------------------------------------------------------------------- /torch/lib/libshm/alloc_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | struct AllocInfo { 6 | pid_t pid; 7 | char free; 8 | char filename[60]; 9 | }; 10 | -------------------------------------------------------------------------------- /android/test_app/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/android/test_app/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/u8lut32norm/scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/TH/TH.h: -------------------------------------------------------------------------------- 1 | #ifndef TH_INC 2 | #define TH_INC 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /docs/source/_static/img/distributed_autograd/local_dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/distributed_autograd/local_dependencies.png -------------------------------------------------------------------------------- /docs/source/_static/img/distributed_autograd/send_recv_functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/distributed_autograd/send_recv_functions.png -------------------------------------------------------------------------------- /docs/source/dlpack.rst: -------------------------------------------------------------------------------- 1 | torch.utils.dlpack 2 | ================== 3 | 4 | .. currentmodule:: torch.utils.dlpack 5 | 6 | .. autofunction:: from_dlpack 7 | .. autofunction:: to_dlpack 8 | -------------------------------------------------------------------------------- /test/cpp_extensions/jit_extension2.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace at; 4 | 5 | Tensor exp_add(Tensor x, Tensor y) { 6 | return x.exp() + y.exp(); 7 | } 8 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_lstm.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_lstm.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_lstm.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_lstm.scripted.pt -------------------------------------------------------------------------------- /torch/_C/_nvtx.pyi: -------------------------------------------------------------------------------- 1 | # Defined in torch/csrc/cuda/shared/nvtx.cpp 2 | def rangePushA(message: str) -> int: ... 3 | def rangePop() -> int: ... 4 | def markA(message: str) -> None: ... 5 | -------------------------------------------------------------------------------- /torch/backends/openmp/__init__.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | 4 | def is_available(): 5 | r"""Returns whether PyTorch is built with OpenMP support.""" 6 | return torch._C.has_openmp 7 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/confu.yaml: -------------------------------------------------------------------------------- 1 | name: clog 2 | title: C-style (a-la printf) logging library 3 | license: Simplified BSD 4 | deps: 5 | - name: googletest 6 | -------------------------------------------------------------------------------- /caffe2/onnx/torch_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ---[ Extra onnx files. 2 | file(GLOB ONNX_SRCS *.cc) 3 | 4 | # ---[ Send the lists to the parent scope. 5 | set(ONNX_SRCS ${ONNX_SRCS} PARENT_SCOPE) 6 | -------------------------------------------------------------------------------- /caffe2/python/onnx/error.py: -------------------------------------------------------------------------------- 1 | ## @package onnx 2 | # Module caffe2.python.onnx.error 3 | 4 | 5 | 6 | 7 | class BaseException(Exception): pass 8 | class Unsupported(BaseException): pass 9 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/pad_test.test_crop.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/pad_test.test_crop.zip -------------------------------------------------------------------------------- /docs/source/elastic/examples.rst: -------------------------------------------------------------------------------- 1 | Examples 2 | ========================== 3 | 4 | Please refer to the `elastic/examples README `_. 5 | -------------------------------------------------------------------------------- /test/expect/TestAutograd.test_function-x_grad_desc.expect: -------------------------------------------------------------------------------- 1 | CopyBackwards(None, AddBackward0(ExpandBackward0(AccumulateGrad()), MulBackward0(ExpandBackward0(AccumulateGrad()), AccumulateGrad()))) -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_lstm.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_lstm.state_dict.pt -------------------------------------------------------------------------------- /test/test_jit_fuser_legacy.py: -------------------------------------------------------------------------------- 1 | import sys 2 | sys.argv.append("--jit_executor=legacy") 3 | from test_jit_fuser import * # noqa: F403 4 | 5 | if __name__ == '__main__': 6 | run_tests() 7 | -------------------------------------------------------------------------------- /test/typing/fail/random.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | import torch 3 | 4 | torch.set_rng_state([1, 2, 3]) # E: Argument 1 to "set_rng_state" has incompatible type "List[int]"; expected "Tensor" 5 | -------------------------------------------------------------------------------- /torch/csrc/api/include/torch/nn/utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.bat text eol=crlf 2 | .circleci/config.yml linguist-generated=true 3 | .github/workflows/generated-*.yml linguist-generated=true 4 | .github/generated-* linguist-generated=true 5 | -------------------------------------------------------------------------------- /aten/src/ATen/core/BackendSelectFallbackKernel.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | TORCH_LIBRARY_IMPL(_, BackendSelect, m) { 4 | m.fallback(torch::CppFunction::makeFallthrough()); 5 | } 6 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/fp32-psimd.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/q31-scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /caffe2/core/tensor_int8.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/tensor_int8.h" 2 | #include 3 | 4 | namespace caffe2 { 5 | CAFFE_KNOWN_TYPE(int8::Int8TensorCPU); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/erf_op_test.test_erf.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/erf_op_test.test_erf.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/top_k_test.test_top_k.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/top_k_test.test_top_k.zip -------------------------------------------------------------------------------- /docs/source/_static/img/distributed_autograd/distributed_dependencies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/distributed_autograd/distributed_dependencies.png -------------------------------------------------------------------------------- /test/cpp/lite_interpreter_runtime/delegated_submodule_with_debug_info.ptl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/cpp/lite_interpreter_runtime/delegated_submodule_with_debug_info.ptl -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-if_one.expect: -------------------------------------------------------------------------------- 1 | def if_one(a: Tensor, 2 | b: Tensor) -> Tensor: 3 | if bool(torch.lt(a, b)): 4 | c = a 5 | else: 6 | c = b 7 | return c 8 | -------------------------------------------------------------------------------- /test/expect/TestJit.test_pretty_printer-if_test.expect: -------------------------------------------------------------------------------- 1 | def if_test(a: Tensor, 2 | b: Tensor) -> Tensor: 3 | if bool(torch.lt(a, b)): 4 | c = b 5 | else: 6 | c = a 7 | return c 8 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_relu.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_relu.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_relu.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_relu.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d_relu.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d_relu.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d_relu.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d_relu.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_relu.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_relu.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_relu.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_relu.traced.pt -------------------------------------------------------------------------------- /torch/csrc/autograd/python_fft_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace autograd { 4 | 5 | void initFFTFunctions(PyObject* module); 6 | 7 | }} // namespace torch::autograd 8 | -------------------------------------------------------------------------------- /torch/csrc/autograd/python_nn_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace autograd { 4 | 5 | void initNNFunctions(PyObject* module); 6 | 7 | }} // namespace torch::autograd 8 | -------------------------------------------------------------------------------- /torch/testing/__init__.py: -------------------------------------------------------------------------------- 1 | from ._core import * # noqa: F403 2 | from ._asserts import * # noqa: F403 3 | from ._creation import * # noqa: F403 4 | from ._deprecated import * # noqa: F403 5 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/src/q8gemm_sparse/8x4c1x4-packed-sse2.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define MR 8 4 | #define COL_BLOCK_SIZE 4 5 | #define PACKED_A_BLOCK_SIZE COL_BLOCK_SIZE*MR 6 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/4x4-packA-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__arm__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/8x4-packA-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__arm__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/fp32-scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/ceil_op_test.test_ceil.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/ceil_op_test.test_ceil.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/clip_op_test.test_clip.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/clip_op_test.test_clip.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/conv_test.test_1x1_conv.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/conv_test.test_1x1_conv.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/find_op_test.test_find.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/find_op_test.test_find.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/math_ops_test.test_sign.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/math_ops_test.test_sign.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/mean_op_test.test_mean.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/mean_op_test.test_mean.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/tile_op_test.test_tile.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/tile_op_test.test_tile.zip -------------------------------------------------------------------------------- /docs/source/model_zoo.rst: -------------------------------------------------------------------------------- 1 | torch.utils.model_zoo 2 | =================================== 3 | 4 | Moved to `torch.hub`. 5 | 6 | .. automodule:: torch.utils.model_zoo 7 | .. autofunction:: load_url 8 | -------------------------------------------------------------------------------- /ios/TestApp/TestApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface AppDelegate : UIResponder 4 | 5 | @property(strong, nonatomic) UIWindow *window; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /test/package/package_a/subpackage.py: -------------------------------------------------------------------------------- 1 | result = "package_a.subpackage" 2 | 3 | 4 | class PackageASubpackageObject: 5 | pass 6 | 7 | 8 | def leaf_function(a, b): 9 | return a + b 10 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_relu.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_relu.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_relu.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_relu.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d_relu.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d_relu.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d_relu.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d_relu.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_relu.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_relu.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_relu.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_relu.scripted.pt -------------------------------------------------------------------------------- /torch/abi-check.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | #ifdef _GLIBCXX_USE_CXX11_ABI 5 | std::cout << _GLIBCXX_USE_CXX11_ABI; 6 | #else 7 | std::cout << 0; 8 | #endif 9 | } 10 | -------------------------------------------------------------------------------- /torch/autograd/_functions/replace.vim: -------------------------------------------------------------------------------- 1 | %s/self/ctx/g 2 | %s/\s\+def forward/ @staticmethod\r def forward/g 3 | %s/\s\+def backward/ @staticmethod\r @once_differentiable\r def backward/g 4 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | local.properties 2 | **/*.iml 3 | .gradle 4 | .idea/* 5 | .externalNativeBuild 6 | build 7 | pytorch_android/src/main/cpp/libtorch_include/** 8 | pytorch_android/src/main/jniLibs/** 9 | -------------------------------------------------------------------------------- /android/pytorch_android/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=pytorch_android pytorch android api 2 | POM_DESCRIPTION=pytorch_android pytorch android api 3 | POM_ARTIFACT_ID=pytorch_android 4 | POM_PACKAGING=aar 5 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/8x4-packA-aarch64-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__aarch64__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/gemmlowp-scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/precise-psimd.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/requantization/precise-scalar.c: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /caffe2/operators/shape_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/shape_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(Shape, ShapeOp); 6 | } 7 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/adagrad_test.test_adagrad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/adagrad_test.test_adagrad.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/arg_ops_test.test_argmax.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/arg_ops_test.test_argmax.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/arg_ops_test.test_argmin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/arg_ops_test.test_argmin.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/boolean_unmask_test.test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/boolean_unmask_test.test.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/fc_operator_test.test_fc.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/fc_operator_test.test_fc.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/floor_op_test.test_floor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/floor_op_test.test_floor.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/glu_op_test.test_glu_old.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/glu_op_test.test_glu_old.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/gru_test.test_gru_unit_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/gru_test.test_gru_unit_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_matmul.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_matmul.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/selu_op_test.test_selu_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/selu_op_test.test_selu_1.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_sum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_sum.zip -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v2.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_graph_v3.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_relu.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_relu.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv3d_relu.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv3d_relu.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_relu.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_relu.state_dict.pt -------------------------------------------------------------------------------- /torch/csrc/autograd/python_linalg_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace autograd { 4 | 5 | void initLinalgFunctions(PyObject* module); 6 | 7 | }} // namespace torch::autograd 8 | -------------------------------------------------------------------------------- /torch/csrc/autograd/python_special_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { namespace autograd { 4 | 5 | void initSpecialFunctions(PyObject* module); 6 | 7 | }} // namespace torch::autograd 8 | -------------------------------------------------------------------------------- /torch/csrc/fx/fx_init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { 6 | namespace fx { 7 | void initFx(PyObject* module); 8 | } // namespace fx 9 | } // namespace torch 10 | -------------------------------------------------------------------------------- /torch/cuda/amp/common.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from importlib.util import find_spec 3 | 4 | 5 | def amp_definitely_not_available(): 6 | return not (torch.cuda.is_available() or find_spec('torch_xla')) 7 | -------------------------------------------------------------------------------- /android/pytorch_android/host/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=pytorch_java_only pytorch java api 2 | POM_DESCRIPTION=pytorch_java_only pytorch java api 3 | POM_ARTIFACT_ID=pytorch_java_only 4 | POM_PACKAGING=jar 5 | -------------------------------------------------------------------------------- /android/pytorch_android_torchvision/gradle.properties: -------------------------------------------------------------------------------- 1 | POM_NAME=pytorch_android_torchvision 2 | POM_DESCRIPTION=pytorch_android_torchvision 3 | POM_ARTIFACT_ID=pytorch_android_torchvision 4 | POM_PACKAGING=aar 5 | -------------------------------------------------------------------------------- /caffe2/contrib/fakelowp/common.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/init.h" 2 | 3 | C10_DEFINE_bool(caffe2_fbgemm_fake_fp16_clamp, true, ""); 4 | 5 | C10_DEFINE_bool(caffe2_fbgemm_fake_fp16_clamp_denorms, true, ""); 6 | -------------------------------------------------------------------------------- /caffe2/core/common_omp.h: -------------------------------------------------------------------------------- 1 | #ifndef CAFFE2_CORE_COMMON_OMP_H_ 2 | #define CAFFE2_CORE_COMMON_OMP_H_ 3 | 4 | #ifdef _OPENMP 5 | #include 6 | #endif // _OPENMP 7 | 8 | #endif // CAFFE2_CORE_COMMON_OMP_H_ 9 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_elu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_elu.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/adadelta_test.test_adadelta.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/adadelta_test.test_adadelta.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/moments_op_test.test_moments.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/moments_op_test.test_moments.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_slice.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_slice.zip -------------------------------------------------------------------------------- /docs/cpp/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx==3.1.2 2 | breathe==4.25.0 3 | exhale==0.2.3 4 | docutils==0.16 5 | -e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme 6 | bs4 7 | lxml 8 | six 9 | -------------------------------------------------------------------------------- /modules/observers/macros.h: -------------------------------------------------------------------------------- 1 | #include "c10/macros/Macros.h" 2 | 3 | #ifdef CAFFE2_BUILD_OBSERVER_LIB 4 | #define CAFFE2_OBSERVER_API C10_EXPORT 5 | #else 6 | #define CAFFE2_OBSERVER_API C10_IMPORT 7 | #endif 8 | -------------------------------------------------------------------------------- /test/expect/TestAutograd.test_function-y_grad_desc.expect: -------------------------------------------------------------------------------- 1 | CopyBackwards(None, AddBackward0(MulBackward0(ExpandBackward0(AccumulateGrad()), None), MulBackward0(ExpandBackward0(AccumulateGrad()), AccumulateGrad()))) -------------------------------------------------------------------------------- /test/onnx/model_defs/__init__.py: -------------------------------------------------------------------------------- 1 | from .squeezenet import * # noqa: F403 2 | from .super_resolution import * # noqa: F403 3 | from .op_test import * # noqa: F403 4 | from .srresnet import * # noqa: F403 5 | -------------------------------------------------------------------------------- /test/package/package_a/test_all_leaf_modules_tracer.py: -------------------------------------------------------------------------------- 1 | from torch.fx import Tracer 2 | 3 | 4 | class TestAllLeafModulesTracer(Tracer): 5 | def is_leaf_module(self, m, qualname): 6 | return True 7 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_default_qat_qconfig.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_default_qat_qconfig.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_channel_observer.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_channel_observer.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_tensor_observer.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_tensor_observer.input.pt -------------------------------------------------------------------------------- /torch/csrc/WindowsTorchApiMacro.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef _WIN32 6 | #define TORCH_PYTHON_API 7 | #else 8 | #define TORCH_PYTHON_API TORCH_API 9 | #endif 10 | -------------------------------------------------------------------------------- /torch/extension.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // All pure C++ headers for the C++ frontend. 4 | #include 5 | // Python bindings for the C++ frontend (includes Python.h). 6 | #include 7 | -------------------------------------------------------------------------------- /torch/nn/qat/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from .linear import Linear 2 | from .conv import Conv2d 3 | from .conv import Conv3d 4 | 5 | __all__ = [ 6 | "Linear", 7 | "Conv2d", 8 | "Conv3d", 9 | ] 10 | -------------------------------------------------------------------------------- /torch/testing/_internal/data/network1.py: -------------------------------------------------------------------------------- 1 | import torch.nn as nn 2 | 3 | 4 | class Net(nn.Module): 5 | 6 | def __init__(self): 7 | super().__init__() 8 | self.linear = nn.Linear(10, 20) 9 | -------------------------------------------------------------------------------- /aten/src/ATen/core/README.md: -------------------------------------------------------------------------------- 1 | ATen Core 2 | --------- 3 | 4 | ATen Core is a minimal subset of ATen which is suitable for deployment 5 | on mobile. Binary size of files in this folder is an important constraint. 6 | -------------------------------------------------------------------------------- /aten/src/ATen/miopen/Handle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace at { namespace native { 6 | 7 | miopenHandle_t getMiopenHandle(); 8 | 9 | }} // namespace 10 | -------------------------------------------------------------------------------- /aten/src/ATen/native/Unfold2d.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace at { namespace native { 4 | 5 | DEFINE_DISPATCH(unfolded2d_copy_stub); 6 | DEFINE_DISPATCH(unfolded2d_acc_stub); 7 | 8 | }} 9 | -------------------------------------------------------------------------------- /c10/util/UniqueVoidPtr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace c10 { 4 | namespace detail { 5 | 6 | void deleteNothing(void*) {} 7 | 8 | } // namespace detail 9 | } // namespace c10 10 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_relu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_relu.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_relu_n.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_relu_n.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_split.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_split.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/elementwise_linear_op_test.test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/elementwise_linear_op_test.test.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/gather_ops_test.test_gather_ops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/gather_ops_test.test_gather_ops.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_cosh.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_cosh.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_sinh.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_sinh.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_tanh.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/hyperbolic_ops_test.test_tanh.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/jsd_ops_test.test_bernoulli_jsd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/jsd_ops_test.test_bernoulli_jsd.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_one_hot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_one_hot.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/recurrent_network_test.test_mul.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/recurrent_network_test.test_mul.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_l2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_l2.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_min.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_min.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_acos.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_acos.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_asin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_asin.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_atan.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_atan.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_tan.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/trigonometric_op_test.test_tan.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/unique_ops_test.test_unique_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/unique_ops_test.test_unique_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/upsample_op_test.test_upsample.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/upsample_op_test.test_upsample.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_nan_check.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_nan_check.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_size_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_size_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_transpose.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_transpose.zip -------------------------------------------------------------------------------- /docs/source/_static/img/distributed_autograd/distributed_dependencies_computed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/docs/source/_static/img/distributed_autograd/distributed_dependencies_computed.png -------------------------------------------------------------------------------- /ios/LibTorch-Lite.h: -------------------------------------------------------------------------------- 1 | #ifndef LibTorch_Lite_h 2 | #define LibTorch_Lite_h 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_default_qat_qconfig.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_default_qat_qconfig.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.input.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.input.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.traced.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.traced.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_channel_observer.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_channel_observer.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_tensor_observer.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_tensor_observer.expected.pt -------------------------------------------------------------------------------- /torch/testing/_internal/test_module/future_div.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | 3 | 4 | def div_int_future(): 5 | return 1 / 2 6 | 7 | 8 | def div_float_future(): 9 | return 3.14 / 0.125 10 | -------------------------------------------------------------------------------- /aten/src/ATen/cpu/vec/functional.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #if !defined(__VSX__) || !defined(CPU_CAPABILITY_VSX) 5 | #include 6 | #endif 7 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/4x8c1x4-dq-packedA-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__arm__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/4x8c8x1-dq-packedA-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__arm__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /c10/cuda/test/impl/CUDATest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | using namespace c10::cuda::impl; 6 | 7 | TEST(CUDATest, SmokeTest) { 8 | c10_cuda_test(); 9 | } 10 | -------------------------------------------------------------------------------- /caffe2/operators/data_couple_gpu.cu: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/data_couple.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(DataCouple, DataCoupleOp); 6 | } 7 | -------------------------------------------------------------------------------- /caffe2/operators/free_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/free_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(Free, FreeOp); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/python/build.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | import caffe2.python._import_c_extension as C 7 | 8 | CAFFE2_NO_OPERATOR_SCHEMA = C.define_caffe2_no_operator_schema 9 | build_options = C.get_build_options() 10 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_concat.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_concat.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/conditional_test.test_conditional.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/conditional_test.test_conditional.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/distance_op_test.test_dot_product.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/distance_op_test.test_dot_product.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/loss_ops_test.test_averaged_loss.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/loss_ops_test.test_averaged_loss.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_batch_matmul.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_batch_matmul.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_mean.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_mean.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sparse_ops_test.testScatterAssign.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sparse_ops_test.testScatterAssign.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/transpose_op_test.test_transpose.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/transpose_op_test.test_transpose.zip -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v2.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_conv2d_nobias_graph_v3.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_default_qat_qconfig.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_default_qat_qconfig.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.expected.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.expected.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.scripted.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.scripted.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_qint8.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_channel_observer.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_channel_observer.state_dict.pt -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_per_tensor_observer.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_per_tensor_observer.state_dict.pt -------------------------------------------------------------------------------- /torch/csrc/api/include/torch/torch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef TORCH_API_INCLUDE_EXTENSION_H 6 | #include 7 | 8 | #endif // defined(TORCH_API_INCLUDE_EXTENSION_H) 9 | -------------------------------------------------------------------------------- /torch/fx/experimental/unification/multipledispatch/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import dispatch 2 | from .dispatcher import (Dispatcher, halt_ordering, restart_ordering, 3 | MDNotImplementedError) 4 | -------------------------------------------------------------------------------- /torch/testing/_internal/test_module/no_future_div.py: -------------------------------------------------------------------------------- 1 | import torch # noqa: F401 2 | 3 | 4 | def div_int_nofuture(): 5 | return 1 / 2 6 | 7 | 8 | def div_float_nofuture(): 9 | return 3.14 / 0.125 10 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/8x8c1x4-dq-packedA-aarch64-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__aarch64__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm_sparse/8x8c8x1-dq-packedA-aarch64-neon.S: -------------------------------------------------------------------------------- 1 | #if defined(__aarch64__) 2 | #include 3 | #endif /* defined(__arm__) */ 4 | -------------------------------------------------------------------------------- /aten/src/ATen/templates/RegistrationDeclarations.h: -------------------------------------------------------------------------------- 1 | // This file contains all native_functions that can be registered to 2 | // and the schema string that they should be registered with 3 | 4 | ${registration_declarations} 5 | -------------------------------------------------------------------------------- /c10/test/util/complex_math_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #define C10_DEFINE_TEST(a, b) TEST(a, b) 3 | #define C10_ASSERT_NEAR(a, b, tol) ASSERT_NEAR(a, b, tol) 4 | #include 5 | -------------------------------------------------------------------------------- /c10/util/thread_name.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace c10 { 8 | 9 | C10_API void setThreadName(std::string name); 10 | 11 | } // namespace c10 12 | -------------------------------------------------------------------------------- /caffe2/db/create_db_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/db/create_db_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(CreateDB, CreateDBOp); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_leaky_relu.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/activation_ops_test.test_leaky_relu.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/boolean_mask_test.test_boolean_mask.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/boolean_mask_test.test_boolean_mask.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/dropout_op_test.test_dropout_is_test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/dropout_op_test.test_dropout_is_test.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/lengths_pad_op_test.test_lengths_pad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/lengths_pad_op_test.test_lengths_pad.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/locally_connected_op_test.test_lc_2d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/locally_connected_op_test.test_lc_2d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/momentum_sgd_test.test_momentum_sgd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/momentum_sgd_test.test_momentum_sgd.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/negate_gradient_op_test.test_forward.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/negate_gradient_op_test.test_forward.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/numpy_tile_op_test.test_numpy_tile.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/numpy_tile_op_test.test_numpy_tile.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_batch_one_hot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_batch_one_hot.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/onnx_while_test.test_onnx_while_fibb.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/onnx_while_test.test_onnx_while_fibb.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_back_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_back_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_rowwise_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_rowwise_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_add_padding.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_add_padding.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax_grad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax_grad.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/upsample_op_test.test_upsample_grad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/upsample_op_test.test_upsample_grad.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_lengths_gather.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_lengths_gather.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/weighted_sum_test.test_weighted_sum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/weighted_sum_test.test_weighted_sum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/wngrad_test.test_sparse_wngrad_empty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/wngrad_test.test_sparse_wngrad_empty.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/wngrad_test.test_wngrad_dense_base.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/wngrad_test.test_wngrad_dense_base.zip -------------------------------------------------------------------------------- /test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.state_dict.pt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/test/quantization/serialized/TestSerialization.test_linear_dynamic_float16.state_dict.pt -------------------------------------------------------------------------------- /test/typing/fail/bitwise_ops.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | import torch 3 | 4 | # binary ops: <<, >>, |, &, ~, ^ 5 | 6 | a = torch.ones(3, dtype=torch.float64) 7 | i = int() 8 | 9 | i | a # E: Unsupported operand types 10 | -------------------------------------------------------------------------------- /torch/csrc/onnx/init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { namespace onnx { 6 | 7 | void initONNXBindings(PyObject* module); 8 | 9 | }} // namespace torch::onnx 10 | -------------------------------------------------------------------------------- /torch/csrc/utils/structseq.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { namespace utils { 6 | 7 | PyObject *returned_structseq_repr(PyStructSequence *obj); 8 | 9 | }} 10 | -------------------------------------------------------------------------------- /caffe2/contrib/opencl/context_test.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace caffe2 { 4 | namespace { 5 | 6 | TEST(ContextTest, BasicInit) { 7 | 8 | } 9 | 10 | } // namespace 11 | } // namespace caffe2 12 | 13 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/adagrad_test.test_sparse_adagrad_empty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/adagrad_test.test_sparse_adagrad_empty.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/batch_box_cox_test.test_batch_box_cox.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/batch_box_cox_test.test_batch_box_cox.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/box_with_nms_limit_op_test.test_simple.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/box_with_nms_limit_op_test.test_simple.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.testChannelStats.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.testChannelStats.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/expand_op_test.test_expand_rand_shape.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/expand_op_test.test_expand_rand_shape.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/gather_ops_test.test_batch_gather_ops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/gather_ops_test.test_batch_gather_ops.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/group_norm_op_test.test_group_norm_2d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/group_norm_op_test.test_group_norm_2d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/lengths_tile_op_test.test_lengths_tile.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/lengths_tile_op_test.test_lengths_tile.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_numpy_batch_matmul.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/matmul_op_test.test_numpy_batch_matmul.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_segment_one_hot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_segment_one_hot.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_back_mean.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_back_mean.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_mean.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_mean.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_sum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduce_ops_test.test_reduce_front_sum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_columnwise_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_columnwise_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_gather_padding.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_gather_padding.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sparse_ops_test.testScatterWeightedSum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sparse_ops_test.testScatterWeightedSum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/string_ops_test.test_string_ends_with.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/string_ops_test.test_string_ends_with.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_max.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_max.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_min.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_min.zip -------------------------------------------------------------------------------- /caffe2/transforms/conv_to_nnpack_transform.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/transforms/conv_to_nnpack_transform.h" 2 | 3 | namespace caffe2 { 4 | 5 | REGISTER_TRANSFORM(ConvToNNPack, ConvToNNPackTransform); 6 | 7 | } // namespace caffe2 8 | -------------------------------------------------------------------------------- /ios/TestApp/fastlane/Scanfile: -------------------------------------------------------------------------------- 1 | scheme("TestAppTests") 2 | open_report(false) 3 | clean(true) 4 | suppress_xcode_output(true) 5 | force_quit_simulator(true) 6 | include_simulator_logs(false) 7 | deployment_target_version('14.0') 8 | -------------------------------------------------------------------------------- /test/package/package_a/use_dunder_package.py: -------------------------------------------------------------------------------- 1 | if "__torch_package__" in dir(): 2 | 3 | def is_from_package(): 4 | return True 5 | 6 | 7 | else: 8 | 9 | def is_from_package(): 10 | return False 11 | -------------------------------------------------------------------------------- /torch/csrc/api/include/torch/autograd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | -------------------------------------------------------------------------------- /torch/csrc/cuda/device_set.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { 6 | 7 | static constexpr size_t MAX_CUDA_DEVICES = 64; 8 | using device_set = std::bitset; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /torch/csrc/jit/codegen/cuda/ops/all_ops.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | -------------------------------------------------------------------------------- /torch/csrc/jit/frontend/parser_constants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace torch { 4 | namespace jit { 5 | static const char* valid_single_char_tokens = "+-*/%@()[]:,={}><.?!&^|~"; 6 | } // namespace jit 7 | } // namespace torch 8 | -------------------------------------------------------------------------------- /torch/distributed/_sharding_spec/__init__.py: -------------------------------------------------------------------------------- 1 | from .api import ( 2 | ChunkShardingSpec, 3 | DevicePlacementSpec, 4 | EnumerableShardingSpec, 5 | PlacementSpec, 6 | ShardMetadata, 7 | ShardingSpec, 8 | ) 9 | -------------------------------------------------------------------------------- /.jenkins/pytorch/win-test-helpers/choose_runtime_cuda_version.bat: -------------------------------------------------------------------------------- 1 | REM The first argument should the CUDA version 2 | echo %PATH% 3 | echo %CUDA_PATH% 4 | set PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%1\bin;%PATH% 5 | -------------------------------------------------------------------------------- /caffe2/operators/assert_op.cu: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/assert_op.h" 3 | 4 | namespace caffe2 { 5 | 6 | REGISTER_CUDA_OPERATOR(Assert, AssertOp); 7 | 8 | } // namespace caffe2 9 | -------------------------------------------------------------------------------- /caffe2/operators/zero_gradient_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/zero_gradient_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(ZeroGradient, ZeroGradientOp); 6 | } 7 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/adadelta_test.test_sparse_adadelta_empty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/adadelta_test.test_sparse_adadelta_empty.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/bbox_transform_test.test_bbox_transform.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/bbox_transform_test.test_bbox_transform.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/channel_shuffle_test.test_channel_shuffle.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/channel_shuffle_test.test_channel_shuffle.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/elementwise_logical_ops_test.test_where.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/elementwise_logical_ops_test.test_where.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/filler_ops_test.test_lengths_range_fill.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/filler_ops_test.test_lengths_range_fill.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/flexible_top_k_test.test_flexible_top_k.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/flexible_top_k_test.test_flexible_top_k.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/gather_ranges_op_test.test_gather_ranges.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/gather_ranges_op_test.test_gather_ranges.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/index_hash_ops_test.test_index_hash_ops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/index_hash_ops_test.test_index_hash_ops.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_sum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_sum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_remove_data_blocks.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_remove_data_blocks.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax_with_loss.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_softmax_with_loss.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/string_ops_test.test_string_starts_with.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/string_ops_test.test_string_starts_with.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_lengths_to_ranges.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_lengths_to_ranges.zip -------------------------------------------------------------------------------- /docs/source/__config__.rst: -------------------------------------------------------------------------------- 1 | torch.__config__ 2 | =================================== 3 | 4 | .. automodule:: torch.__config__ 5 | .. currentmodule:: torch.__config__ 6 | 7 | .. autofunction:: show 8 | .. autofunction:: parallel_info 9 | -------------------------------------------------------------------------------- /docs/source/distributed.optim.rst: -------------------------------------------------------------------------------- 1 | .. role:: hidden 2 | :class: hidden-section 3 | 4 | Distributed Optimizers 5 | ====================== 6 | 7 | .. autoclass:: torch.distributed.optim.ZeroRedundancyOptimizer 8 | :members: 9 | -------------------------------------------------------------------------------- /test/cpp/api/support.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace torch { 4 | namespace test { 5 | 6 | std::mutex AutoDefaultDtypeMode::default_dtype_mutex; 7 | 8 | } // namespace test 9 | } // namespace torch 10 | -------------------------------------------------------------------------------- /torch/csrc/jit/python/init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { 6 | namespace jit { 7 | 8 | void initJITBindings(PyObject* module); 9 | 10 | } 11 | } // namespace torch 12 | -------------------------------------------------------------------------------- /torch/nn/quantized/_reference/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from .linear import Linear 2 | from .conv import Conv1d, Conv2d, Conv3d 3 | 4 | __all__ = [ 5 | 'Linear', 6 | 'Conv1d', 7 | 'Conv2d', 8 | 'Conv3d', 9 | ] 10 | -------------------------------------------------------------------------------- /.github/actionlint.yaml: -------------------------------------------------------------------------------- 1 | self-hosted-runner: 2 | labels: 3 | - linux.2xlarge 4 | - linux.8xlarge.nvidia.gpu 5 | - linux.16xlarge.nvidia.gpu 6 | - windows.4xlarge 7 | - windows.8xlarge.nvidia.gpu 8 | - bm-runner 9 | -------------------------------------------------------------------------------- /aten/src/ATen/core/TensorImpl_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST(TensorImplTest, Caffe2Constructor) { 5 | caffe2::Tensor tensor(caffe2::CPU); 6 | ASSERT_EQ(tensor.strides()[0], 1); 7 | } 8 | -------------------------------------------------------------------------------- /aten/src/ATen/core/function_schema.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | namespace c10 { 6 | 7 | void FunctionSchema::dump() const { 8 | std::cout << *this << "\n"; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /caffe2/onnx/onnxifi_init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "foxi/onnxifi_loader.h" 4 | 5 | namespace caffe2 { 6 | namespace onnx { 7 | 8 | onnxifi_library* initOnnxifiLibrary(); 9 | } // namespace onnx 10 | } // namespace caffe2 11 | -------------------------------------------------------------------------------- /caffe2/operators/do_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/do_op.h" 2 | 3 | #include "caffe2/core/context_gpu.h" 4 | 5 | namespace caffe2 { 6 | 7 | REGISTER_CUDA_OPERATOR(Do, DoOp); 8 | 9 | } // namespace caffe2 10 | -------------------------------------------------------------------------------- /caffe2/operators/if_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/if_op.h" 2 | 3 | #include "caffe2/core/context_gpu.h" 4 | 5 | namespace caffe2 { 6 | 7 | REGISTER_CUDA_OPERATOR(If, IfOp); 8 | 9 | } // namespace caffe2 10 | -------------------------------------------------------------------------------- /caffe2/operators/matmul_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/matmul_op.h" 2 | 3 | #include "caffe2/core/context_gpu.h" 4 | 5 | namespace caffe2 { 6 | 7 | REGISTER_CUDA_OPERATOR(MatMul, MatMulOp); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/batch_moments_op_test.test_batch_moments_2d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/batch_moments_op_test.test_batch_moments_2d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.test_channel_stats_2d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.test_channel_stats_2d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.test_channel_stats_3d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/channel_stats_op_test.test_channel_stats_3d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_split_by_lengths.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/concat_split_op_test.test_split_by_lengths.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/filler_ops_test.test_diagonal_fill_op_float.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/filler_ops_test.test_diagonal_fill_op_float.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/layer_norm_op_test.test_layer_norm_grad_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/layer_norm_op_test.test_layer_norm_grad_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/length_split_op_test.test_length_split_edge.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/length_split_op_test.test_length_split_edge.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/momentum_sgd_test.test_sparse_momentum_sgd.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/momentum_sgd_test.test_sparse_momentum_sgd.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/pack_ops_test.test_pack_with_max_length_ops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/pack_ops_test.test_pack_with_max_length_ops.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_int_sum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_int_sum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_sqrsum.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/reduction_ops_test.test_elementwise_sqrsum.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_reverse_packed_segs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_reverse_packed_segs.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_max_grad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_max_grad.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_min_grad.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/utility_ops_test.test_elementwise_min_grad.zip -------------------------------------------------------------------------------- /third_party/miniz-2.0.8/BUILD.bazel: -------------------------------------------------------------------------------- 1 | cc_library( 2 | name = "miniz", 3 | srcs = [ 4 | "miniz.c", 5 | ], 6 | hdrs = [ 7 | "miniz.h", 8 | ], 9 | visibility = ["//visibility:public"], 10 | ) 11 | -------------------------------------------------------------------------------- /.circleci/docker/common/install_lcov.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | git clone --branch v1.15 https://github.com/linux-test-project/lcov.git 6 | pushd lcov 7 | sudo make install # will be installed in /usr/local/bin/lcov 8 | popd 9 | -------------------------------------------------------------------------------- /c10/test/util/Macros.h: -------------------------------------------------------------------------------- 1 | #ifndef C10_TEST_CORE_MACROS_MACROS_H_ 2 | 3 | #ifdef _WIN32 4 | #define DISABLED_ON_WINDOWS(x) DISABLED_##x 5 | #else 6 | #define DISABLED_ON_WINDOWS(x) x 7 | #endif 8 | 9 | #endif // C10_MACROS_MACROS_H_ 10 | -------------------------------------------------------------------------------- /caffe2/contrib/tensorrt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ---[ GPU files. 2 | file(GLOB tmp *.cc) 3 | set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} ${tmp}) 4 | 5 | # ---[ Send the lists to the parent scope. 6 | set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} PARENT_SCOPE) 7 | -------------------------------------------------------------------------------- /caffe2/operators/unsafe_coalesce.cu: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/unsafe_coalesce.h" 2 | #include "caffe2/core/context_gpu.h" 3 | 4 | namespace caffe2 { 5 | 6 | REGISTER_CUDA_OPERATOR(UnsafeCoalesce, UnsafeCoalesceOp); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/affine_channel_op_test.test_affine_channel_2d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/affine_channel_op_test.test_affine_channel_2d.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/elementwise_logical_ops_test.test_is_member_of.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/elementwise_logical_ops_test.test_is_member_of.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/gather_ranges_op_test.test_gather_ranges_split.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/gather_ranges_op_test.test_gather_ranges_split.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/lengths_top_k_ops_test.test_lengths_top_k_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/lengths_top_k_ops_test.test_lengths_top_k_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/merge_id_lists_op_test.test_merge_id_lists_op.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/merge_id_lists_op_test.test_merge_id_lists_op.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_batch_bucketized_one_hot.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/one_hot_ops_test.test_batch_bucketized_one_hot.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_find_duplicate_elements.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/sequence_ops_test.test_find_duplicate_elements.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/spatial_bn_op_test.test_spatialbn_test_mode_3d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/spatial_bn_op_test.test_spatialbn_test_mode_3d.zip -------------------------------------------------------------------------------- /torch/csrc/distributed/c10d/frontend_cuda.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef USE_C10D_NCCL 4 | #include 5 | 6 | namespace c10d { 7 | 8 | TORCH_API void initCustomClassBindingsNccl(); 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /torch/fx/experimental/unification/__init__.py: -------------------------------------------------------------------------------- 1 | # type: ignore[attr-defined] 2 | from .core import unify, reify # noqa: F403 3 | from .more import unifiable # noqa: F403 4 | from .variable import var, isvar, vars, variables, Var # noqa: F403 5 | -------------------------------------------------------------------------------- /torch/nn/quantizable/modules/__init__.py: -------------------------------------------------------------------------------- 1 | from .activation import MultiheadAttention 2 | from .rnn import LSTM 3 | from .rnn import LSTMCell 4 | 5 | __all__ = [ 6 | 'LSTM', 7 | 'LSTMCell', 8 | 'MultiheadAttention', 9 | ] 10 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8conv/4x8-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #if defined(__arm__) 4 | #include 5 | #endif /* defined(__arm__) */ 6 | -------------------------------------------------------------------------------- /aten/src/ATen/native/quantized/cpu/qnnpack/wrappers/q8gemm/4x8-aarch32-neon.S: -------------------------------------------------------------------------------- 1 | /* Auto-generated by generate-wrappers.py script. Do not modify */ 2 | 3 | #if defined(__arm__) 4 | #include 5 | #endif /* defined(__arm__) */ 6 | -------------------------------------------------------------------------------- /caffe2/operators/accumulate_op.cu: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/accumulate_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(Accumulate, AccumulateOp); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/operators/lengths_pad_op.cu: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/lengths_pad_op.h" 2 | 3 | #include "caffe2/core/context_gpu.h" 4 | 5 | namespace caffe2 { 6 | REGISTER_CUDA_OPERATOR(LengthsPad, LengthsPadOp); 7 | } // namespace caffe2 8 | -------------------------------------------------------------------------------- /caffe2/operators/quantized/int8_conv_op_relu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/quantized/int8_conv_op.h" 2 | 3 | namespace caffe2 { 4 | 5 | REGISTER_CPU_OPERATOR(Int8ConvRelu, int8::Int8ConvOp); 6 | 7 | } // namespace caffe2 8 | -------------------------------------------------------------------------------- /caffe2/operators/stop_gradient_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/operators/stop_gradient.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(StopGradient, StopGradientOp); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/operators/while_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/operators/while_op.h" 2 | 3 | #include "caffe2/core/context_gpu.h" 4 | 5 | namespace caffe2 { 6 | 7 | REGISTER_CUDA_OPERATOR(While, WhileOp); 8 | 9 | } // namespace caffe2 10 | -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/adagrad_test.test_row_wise_sparse_adagrad_empty.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/adagrad_test.test_row_wise_sparse_adagrad_empty.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/clip_tensor_op_test.test_clip_tensor_by_scaling.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/clip_tensor_op_test.test_clip_tensor_by_scaling.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/integral_image_ops_test.test_integral_image_ops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/integral_image_ops_test.test_integral_image_ops.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/pack_rnn_sequence_op_test.test_pack_rnn_seqence.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/pack_rnn_sequence_op_test.test_pack_rnn_seqence.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_spatial_softmax_with_loss.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/softmax_ops_test.test_spatial_softmax_with_loss.zip -------------------------------------------------------------------------------- /caffe2/python/serialized_test/data/operator_test/thresholded_relu_op_test.test_thresholded_relu_1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/pytorch/HEAD/caffe2/python/serialized_test/data/operator_test/thresholded_relu_op_test.test_thresholded_relu_1.zip -------------------------------------------------------------------------------- /caffe2/sgd/learning_rate_op_gpu.cc: -------------------------------------------------------------------------------- 1 | #include "caffe2/core/context_gpu.h" 2 | #include "caffe2/sgd/learning_rate_op.h" 3 | 4 | namespace caffe2 { 5 | REGISTER_CUDA_OPERATOR(LearningRate, LearningRateOp); 6 | } // namespace caffe2 7 | -------------------------------------------------------------------------------- /caffe2/utils/cpuid_test.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "caffe2/utils/cpuid.h" 3 | 4 | namespace caffe2 { 5 | 6 | TEST(CpuIdTest, ShouldAlwaysHaveMMX) { 7 | EXPECT_TRUE(GetCpuId().mmx()); 8 | } 9 | 10 | } // namespace caffe2 11 | -------------------------------------------------------------------------------- /test/package/package_b/subpackage_0/subsubpackage_0/__init__.py: -------------------------------------------------------------------------------- 1 | __import__("subpackage_1", globals(), locals(), ["PackageBSubpackage1Object_0"], 3) 2 | 3 | result = "subsubpackage_0" 4 | 5 | 6 | class PackageBSubsubpackage0Object_0: 7 | pass 8 | -------------------------------------------------------------------------------- /third_party/mkl_headers.BUILD: -------------------------------------------------------------------------------- 1 | load("@rules_cc//cc:defs.bzl", "cc_library") 2 | 3 | cc_library( 4 | name = "mkl_headers", 5 | hdrs = glob(["include/*.h"]), 6 | includes = ["include/"], 7 | visibility = ["//visibility:public"], 8 | ) 9 | -------------------------------------------------------------------------------- /torch/csrc/api/src/nn/options/dropout.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace torch { 4 | namespace nn { 5 | 6 | DropoutOptions::DropoutOptions(double p) : p_(p) {} 7 | 8 | } // namespace nn 9 | } // namespace torch 10 | -------------------------------------------------------------------------------- /torch/csrc/jit/passes/batch_mm.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace torch { 6 | namespace jit { 7 | 8 | TORCH_API void BatchMM(std::shared_ptr& graph); 9 | 10 | } 11 | } // namespace torch 12 | --------------------------------------------------------------------------------