pytorch/test
Jiang, Yanbing f77eb07662 Split int4wo weight packing (#139611)
Fixes https://github.com/pytorch/ao/issues/1117.

This PR is to seperate int4wo weight packing between CPU and other devices, to help implement `INT4CPULayout` in torchao based on https://github.com/pytorch/ao/issues/1117#issuecomment-2451252756.

Now, for CPU, the input `weight` of `_convert_weight_to_int4pack_for_cpu` is [n, k] int32, output is [n, k / 2] uint8. The input packed weight of `_weight_int4pack_mm_for_cpu` is [n, k / 2] uint8.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139611
Approved by: https://github.com/jerryzh168
2024-11-12 10:12:50 +00:00
..
ao/sparsity remove skips due to https://github.com/pytorch/torchdynamo/issues/1991 (#138133) 2024-10-17 17:42:46 +00:00
autograd
backends/xeon
benchmark_utils c10::optional -> std::optional in PyTorch (#137333) 2024-10-11 00:16:10 +00:00
bottleneck_test
cpp [8/N] Don't skip ASAN on some tests (#140081) 2024-11-09 01:00:13 +00:00
cpp_api_parity
cpp_extensions OpenReg: Support event (#140111) 2024-11-10 08:38:45 +00:00
custom_backend
custom_operator C10_UNUSED to [[maybe_unused]] (#6357) (#138364) 2024-10-19 13:17:43 +00:00
distributed ILP for auto FSDP wrapping (#140298) 2024-11-11 22:02:39 +00:00
distributions
dynamo fix trace nn.parameters() (#138149) 2024-11-12 09:43:45 +00:00
dynamo_expected_failures Revert "[dynamo] Fix constant propagation in builtins and UserClasses (#131354)" 2024-11-01 00:13:20 +00:00
dynamo_skips config: Add env_name_default and env_name_force to Config (#138956) 2024-11-06 21:20:42 +00:00
edge Set RUNPATH so installed tests can find the required shared libraries (#136627) 2024-10-25 09:38:08 +00:00
error_messages
expect Split int4wo weight packing (#139611) 2024-11-12 10:12:50 +00:00
export dispatcher module for multiple graphs (#139439) 2024-11-12 09:53:40 +00:00
forward_backward_compatibility [BC] Add check for core ATen opset schema BC (#137664) 2024-10-18 01:58:33 +00:00
functorch Revert "Fix typo in associative_scan tests (#139929)" 2024-11-08 21:26:41 +00:00
fx Revert "Refactor FxGraphDrawer to use HTML-like labels (#137726)" 2024-11-04 17:44:44 +00:00
higher_order_ops [inductor][invoke_subgraph] Fix SDPA seed/offset issue (#140070) 2024-11-12 04:40:03 +00:00
inductor [Inductor] make decompose_mm_pass support cpu case (#139696) 2024-11-12 06:22:23 +00:00
jit remove skips due to https://github.com/pytorch/torchdynamo/issues/1991 (#138133) 2024-10-17 17:42:46 +00:00
jit_hooks
lazy
mobile
nn [pytorch] Make global module hook to pass kwargs similar to how module hook works (#137403) 2024-11-06 18:20:57 +00:00
onnx [ONNX] Update TorchTensor implementation to handle fake mode (#139534) 2024-11-07 04:36:24 +00:00
optim Allow SequentialLR to include ChainedScheduler (#133450) 2024-10-18 02:29:38 +00:00
package
profiler [profiler][UT] instantiate profiler UTs for devices and enable UTs for xpu profiler (#134316) 2024-11-05 05:46:13 +00:00
quantization [numerical debugger] bumped up the starting handler id (#139666) 2024-11-07 01:00:43 +00:00
scripts
test_img
torch_np Update test_multiarray.py to support numpy 2.0+ (#138461) 2024-10-28 04:30:50 +00:00
typing
xpu
_test_bazel.py
allowlist_for_publicAPI.json [BE][Easy] enable PYFMT for torch.fx (#138443) 2024-10-21 19:15:49 +00:00
conftest.py
create_dummy_torchscript_model.py
delete.py
hi.py
HowToWriteTestsUsingFileCheck.md
linear.py
load_torchscript_model.py Flip default on weights_only (#137602) 2024-11-04 18:30:29 +00:00
minioptest_failures_dict.json
mkl_verbose.py
mkldnn_verbose.py
pytest_shard_custom.py
run_doctests.sh
run_test.py Upload artifacts during test run (#125799) 2024-10-22 16:48:57 +00:00
simulate_nccl_errors.py
slow_tests.json Update slow tests (#139051) 2024-11-04 11:49:06 +00:00
test_ao_sparsity.py
test_autocast.py [MPS] Update error message for supported autocast type (#139192) 2024-10-30 16:48:29 +00:00
test_autograd.py [compiled autograd] add tests for bwd hooks relative firing order (#139004) 2024-10-28 05:55:56 +00:00
test_autograd_fallback.py
test_autoload.py
test_binary_ufuncs.py Fix test_binary_ufuncs.py for NumPy 2 (#137937) 2024-10-15 17:04:24 +00:00
test_bundled_images.py
test_bundled_inputs.py
test_ci_sanity_check_fail.py
test_comparison_utils.py
test_compile_benchmark_util.py
test_complex.py
test_content_store.py
test_cpp_api_parity.py
test_cpp_extensions_aot.py remove skips due to https://github.com/pytorch/torchdynamo/issues/1991 (#138133) 2024-10-17 17:42:46 +00:00
test_cpp_extensions_jit.py Avoid file encoding issues when loading cpp extensions (#138565) 2024-10-28 14:06:34 +00:00
test_cpp_extensions_mtia_backend.py
test_cpp_extensions_open_device_registration.py Remove dependency on numpy for serialization for XLA/open registration devices without numpy (#137444) 2024-10-09 19:35:55 +00:00
test_cpp_extensions_stream_and_event.py
test_cuda.py Refactors empty_cache to return only MemPool memory to the system (#133602) 2024-10-29 23:58:44 +00:00
test_cuda_expandable_segments.py
test_cuda_multigpu.py
test_cuda_nvml_based_avail.py
test_cuda_primary_ctx.py
test_cuda_sanitizer.py [BE]: Add better optional typing (#138426) 2024-10-27 14:19:00 +00:00
test_cuda_trace.py
test_custom_ops.py no-op torch.library.custom_op APIs on torch.deploy (#139509) 2024-11-04 18:01:08 +00:00
test_dataloader.py [2/N] Don't skip ASAN on some tests (#138663) 2024-10-28 03:35:57 +00:00
test_datapipe.py
test_decomp.py [7/N] Don't skip ASAN on some tests (#139675) 2024-11-05 14:01:01 +00:00
test_deploy.py
test_determination.py
test_dispatch.py
test_dlpack.py Use DLPack for creating tensors out of custom classes, when available. (#138697) 2024-10-26 01:27:05 +00:00
test_dynamic_shapes.py Add sym_log2 (#137980) 2024-10-28 17:03:14 +00:00
test_expanded_weights.py
test_fake_tensor.py Revert "Fix split decomp returning self (#140065)" 2024-11-09 00:16:26 +00:00
test_file_check.py
test_flop_counter.py FlopCounterMode: Decompose ops for inference mode (#138508) 2024-11-09 03:13:53 +00:00
test_foreach.py correctly keep track of processed tensors for foreach reductions (#140103) 2024-11-08 23:04:53 +00:00
test_function_schema.py
test_functional_autograd_benchmark.py
test_functional_optim.py
test_functionalization.py
test_functionalization_of_rng_ops.py
test_futures.py
test_fx.py Revert "Refactor FxGraphDrawer to use HTML-like labels (#137726)" 2024-11-04 17:44:44 +00:00
test_fx_experimental.py [fx] split_module subgraph should always have an output node (#139275) 2024-10-31 04:53:19 +00:00
test_fx_passes.py
test_fx_reinplace_pass.py
test_hub.py
test_import_stats.py
test_indexing.py [ROCm] index_put performance improvement (#138259) 2024-10-22 15:21:43 +00:00
test_itt.py
test_jit.py Re-enable skipped ubsan tests (#139008) 2024-10-28 05:21:31 +00:00
test_jit_autocast.py
test_jit_disabled.py
test_jit_fuser.py
test_jit_fuser_legacy.py
test_jit_fuser_te.py
test_jit_legacy.py
test_jit_llga_fuser.py
test_jit_profiling.py
test_jit_simple.py
test_jit_string.py
test_jiterator.py
test_kernel_launch_checks.py
test_legacy_vmap.py
test_license.py
test_linalg.py Split int4wo weight packing (#139611) 2024-11-12 10:12:50 +00:00
test_logging.py
test_masked.py
test_maskedtensor.py Fix memory leak on masked Tensor (#137890) 2024-10-15 18:37:55 +00:00
test_matmul_cuda.py
test_meta.py [6/N] Don't skip ASAN on some tests (#139565) 2024-11-04 21:32:44 +00:00
test_metal.py
test_mkl_verbose.py
test_mkldnn.py
test_mkldnn_fusion.py
test_mkldnn_verbose.py
test_mobile_optimizer.py
test_model_dump.py
test_model_exports_to_core_aten.py
test_module_tracker.py
test_modules.py
test_monitor.py
test_mps.py Split int4wo weight packing (#139611) 2024-11-12 10:12:50 +00:00
test_multiprocessing.py
test_multiprocessing_spawn.py
test_namedtensor.py
test_namedtuple_return_api.py
test_native_functions.py
test_native_mha.py
test_nestedtensor.py Revert "Allow NJT by default for weights_only torch.load (#140304)" 2024-11-12 04:53:10 +00:00
test_nn.py Add APIs to separate norm calculation and gradient scaling in nn.utils.clip_grad_norm_ (#139662) 2024-11-07 23:13:23 +00:00
test_nnapi.py
test_numba_integration.py
test_numpy_interop.py Fix dtype test for NumPy 2 (#137532) 2024-10-10 18:12:25 +00:00
test_openmp.py [1/N] Don't skip ASAN on some tests (#138571) 2024-10-23 02:38:45 +00:00
test_ops.py addmm: error on output dtype mismatch. (#138520) 2024-10-30 21:46:39 +00:00
test_ops_fwd_gradients.py
test_ops_gradients.py
test_ops_jit.py
test_optim.py Revert "Deprecate torch._utils.is_compiling() and torch._dynamo.external_utils.is_compiling() (#127690)" 2024-11-05 23:10:38 +00:00
test_out_dtype_op.py
test_overrides.py Introduce torch.sym_add, variadic add (#138660) 2024-10-23 17:42:41 +00:00
test_package.py
test_per_overload_api.py
test_prims.py
test_proxy_tensor.py [4/N] Don't skip ASAN on some tests (#139189) 2024-10-30 00:59:32 +00:00
test_pruning_op.py
test_public_bindings.py Revert "[Dynamo] Disable torch function compilation during guard execution and in compiled bytecode (#137669)" 2024-10-15 23:22:58 +00:00
test_python_dispatch.py
test_pytree.py
test_quantization.py
test_reductions.py Fix torch.histc not checking min > max on cuda for int8 tensors (#139372) 2024-11-05 08:42:38 +00:00
test_scatter_gather_ops.py
test_schema_check.py
test_segment_reductions.py
test_serialization.py Flip default on weights_only (#137602) 2024-11-04 18:30:29 +00:00
test_set_default_mobile_cpu_allocator.py
test_shape_ops.py Add size param check of unfold (#139965) 2024-11-09 17:12:53 +00:00
test_show_pickle.py
test_sort_and_select.py Support torch.bool in torch.sort + CUDA (#139409) 2024-11-06 00:02:54 +00:00
test_sparse.py remove skips due to https://github.com/pytorch/torchdynamo/issues/1991 (#138133) 2024-10-17 17:42:46 +00:00
test_sparse_csr.py Add out_dtype kw argument to optimize_bsr_dense_addmm (#136626) 2024-10-22 09:52:25 +00:00
test_sparse_semi_structured.py Revert "[sparse] add search for optimal alg_id to torch.compile (#137427)" 2024-10-24 17:27:06 +00:00
test_spectral_ops.py
test_stateless.py
test_static_runtime.py
test_subclass.py
test_sympy_utils.py Make OpaqueUnaryFn pickleable (#138395) 2024-10-28 13:10:04 +00:00
test_tensor_creation_ops.py remove skips due to https://github.com/pytorch/torchdynamo/issues/1991 (#138133) 2024-10-17 17:42:46 +00:00
test_tensorboard.py
test_tensorexpr.py
test_tensorexpr_pybind.py
test_testing.py More flexible test parametrization with @reparametrize (#138369) 2024-10-29 22:14:38 +00:00
test_throughput_benchmark.py
test_torch.py Add size param check of unfold (#139965) 2024-11-09 17:12:53 +00:00
test_transformers.py [cuDNN][SDPA] Match query's memory layout ordering for output in cuDNN SDPA (#138354) 2024-11-04 23:49:09 +00:00
test_type_hints.py
test_type_info.py
test_type_promotion.py
test_typing.py
test_unary_ufuncs.py
test_utils.py
test_utils_config_module.py Add type annotations to Configs (#139833) 2024-11-07 03:49:09 +00:00
test_view_ops.py
test_vulkan.py
test_weak.py
test_xnnpack_integration.py
test_xpu.py Add torch.version.xpu (#139466) 2024-11-09 13:31:21 +00:00