torchrec 0.2.0.dev0__37-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- examples/__init__.py +0 -0
- examples/datasets/__init__.py +8 -0
- examples/datasets/criteo_dataframes.py +101 -0
- examples/ray/__init__.py +0 -0
- examples/ray/compute_world_size.py +51 -0
- examples/ray/train_torchrec.py +133 -0
- examples/retrieval/__init__.py +6 -0
- examples/retrieval/data/__init__.py +6 -0
- examples/retrieval/data/dataloader.py +44 -0
- examples/retrieval/knn_index.py +67 -0
- examples/retrieval/modules/__init__.py +6 -0
- examples/retrieval/modules/two_tower.py +229 -0
- examples/retrieval/two_tower_retrieval.py +192 -0
- examples/retrieval/two_tower_train.py +253 -0
- examples/torcharrow/__init__.py +8 -0
- examples/torcharrow/dataloader.py +116 -0
- examples/torcharrow/run.py +126 -0
- fbgemm_gpu/__init__.py +16 -0
- fbgemm_gpu/batched_unary_embeddings_ops.py +82 -0
- fbgemm_gpu/enums.py +21 -0
- fbgemm_gpu/fbgemm_gpu_py.so +0 -0
- fbgemm_gpu/permute_pooled_embedding_modules.py +73 -0
- fbgemm_gpu/permute_pooled_embedding_modules_split.py +76 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/__init__.py +19 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_adagrad.py +120 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_adam.py +149 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad.py +128 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad_with_counter.py +134 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad_with_weight_decay.py +128 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_sgd.py +105 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_args.py +54 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_lamb.py +149 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_lars_sgd.py +128 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_partial_rowwise_adam.py +149 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_partial_rowwise_lamb.py +149 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad.py +128 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad_with_counter.py +134 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad_with_weight_decay.py +128 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_weighted_adagrad.py +130 -0
- fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_sgd.py +105 -0
- fbgemm_gpu/split_embedding_configs.py +182 -0
- fbgemm_gpu/split_embedding_inference_converter.py +208 -0
- fbgemm_gpu/split_table_batched_embeddings_ops.py +2503 -0
- fbgemm_gpu/uvm.py +35 -0
- torchrec/__init__.py +27 -0
- torchrec/datasets/__init__.py +31 -0
- torchrec/datasets/criteo.py +831 -0
- torchrec/datasets/movielens.py +140 -0
- torchrec/datasets/random.py +188 -0
- torchrec/datasets/scripts/__init__.py +0 -0
- torchrec/datasets/scripts/contiguous_preproc_criteo.py +75 -0
- torchrec/datasets/scripts/npy_preproc_criteo.py +73 -0
- torchrec/datasets/test_utils/__init__.py +0 -0
- torchrec/datasets/test_utils/criteo_test_utils.py +139 -0
- torchrec/datasets/utils.py +341 -0
- torchrec/distributed/__init__.py +55 -0
- torchrec/distributed/batched_embedding_kernel.py +697 -0
- torchrec/distributed/collective_utils.py +71 -0
- torchrec/distributed/comm.py +149 -0
- torchrec/distributed/comm_ops.py +930 -0
- torchrec/distributed/dist_data.py +949 -0
- torchrec/distributed/embedding.py +638 -0
- torchrec/distributed/embedding_kernel.py +326 -0
- torchrec/distributed/embedding_lookup.py +760 -0
- torchrec/distributed/embedding_sharding.py +660 -0
- torchrec/distributed/embedding_tower_sharding.py +992 -0
- torchrec/distributed/embedding_types.py +369 -0
- torchrec/distributed/embeddingbag.py +731 -0
- torchrec/distributed/fused_embeddingbag.py +148 -0
- torchrec/distributed/grouped_position_weighted.py +103 -0
- torchrec/distributed/model_parallel.py +555 -0
- torchrec/distributed/planner/__init__.py +24 -0
- torchrec/distributed/planner/constants.py +77 -0
- torchrec/distributed/planner/enumerators.py +353 -0
- torchrec/distributed/planner/parallelized_planners.py +307 -0
- torchrec/distributed/planner/partitioners.py +280 -0
- torchrec/distributed/planner/perf_models.py +24 -0
- torchrec/distributed/planner/planners.py +290 -0
- torchrec/distributed/planner/proposers.py +270 -0
- torchrec/distributed/planner/shard_estimators.py +971 -0
- torchrec/distributed/planner/stats.py +477 -0
- torchrec/distributed/planner/storage_reservations.py +168 -0
- torchrec/distributed/planner/types.py +423 -0
- torchrec/distributed/planner/utils.py +30 -0
- torchrec/distributed/quant_embedding.py +307 -0
- torchrec/distributed/quant_embedding_kernel.py +295 -0
- torchrec/distributed/quant_embeddingbag.py +288 -0
- torchrec/distributed/sharding/__init__.py +0 -0
- torchrec/distributed/sharding/cw_sequence_sharding.py +71 -0
- torchrec/distributed/sharding/cw_sharding.py +242 -0
- torchrec/distributed/sharding/dp_sequence_sharding.py +87 -0
- torchrec/distributed/sharding/dp_sharding.py +217 -0
- torchrec/distributed/sharding/rw_sequence_sharding.py +130 -0
- torchrec/distributed/sharding/rw_sharding.py +393 -0
- torchrec/distributed/sharding/sequence_sharding.py +69 -0
- torchrec/distributed/sharding/tw_sequence_sharding.py +211 -0
- torchrec/distributed/sharding/tw_sharding.py +469 -0
- torchrec/distributed/sharding/twcw_sharding.py +32 -0
- torchrec/distributed/sharding/twrw_sharding.py +543 -0
- torchrec/distributed/sharding/vb_cw_sharding.py +91 -0
- torchrec/distributed/sharding/vb_rw_sharding.py +250 -0
- torchrec/distributed/sharding/vb_sharding.py +54 -0
- torchrec/distributed/sharding/vb_tw_sharding.py +148 -0
- torchrec/distributed/sharding/vb_twrw_sharding.py +388 -0
- torchrec/distributed/test_utils/__init__.py +0 -0
- torchrec/distributed/test_utils/multi_process.py +132 -0
- torchrec/distributed/test_utils/test_model.py +818 -0
- torchrec/distributed/test_utils/test_model_parallel.py +74 -0
- torchrec/distributed/test_utils/test_model_parallel_base.py +117 -0
- torchrec/distributed/test_utils/test_sharding.py +280 -0
- torchrec/distributed/train_pipeline.py +531 -0
- torchrec/distributed/types.py +594 -0
- torchrec/distributed/utils.py +186 -0
- torchrec/fused_planner.py +57 -0
- torchrec/fx/__init__.py +15 -0
- torchrec/fx/tracer.py +78 -0
- torchrec/inference/__init__.py +25 -0
- torchrec/inference/client.py +127 -0
- torchrec/inference/model_packager.py +102 -0
- torchrec/inference/modules.py +155 -0
- torchrec/inference/state_dict_transform.py +103 -0
- torchrec/metrics/__init__.py +0 -0
- torchrec/metrics/auc.py +159 -0
- torchrec/metrics/calibration.py +108 -0
- torchrec/metrics/ctr.py +104 -0
- torchrec/metrics/metric_module.py +358 -0
- torchrec/metrics/metrics_config.py +152 -0
- torchrec/metrics/metrics_namespace.py +114 -0
- torchrec/metrics/model_utils.py +85 -0
- torchrec/metrics/mse.py +134 -0
- torchrec/metrics/ne.py +164 -0
- torchrec/metrics/rec_metric.py +686 -0
- torchrec/metrics/throughput.py +174 -0
- torchrec/models/__init__.py +27 -0
- torchrec/models/deepfm.py +346 -0
- torchrec/models/dlrm.py +708 -0
- torchrec/modules/__init__.py +34 -0
- torchrec/modules/activation.py +55 -0
- torchrec/modules/crossnet.py +446 -0
- torchrec/modules/deepfm.py +213 -0
- torchrec/modules/embedding_configs.py +148 -0
- torchrec/modules/embedding_modules.py +381 -0
- torchrec/modules/embedding_tower.py +150 -0
- torchrec/modules/feature_processor.py +74 -0
- torchrec/modules/fused_embedding_modules.py +625 -0
- torchrec/modules/lazy_extension.py +258 -0
- torchrec/modules/mlp.py +172 -0
- torchrec/modules/utils.py +117 -0
- torchrec/optim/__init__.py +35 -0
- torchrec/optim/clipping.py +53 -0
- torchrec/optim/fused.py +42 -0
- torchrec/optim/keyed.py +399 -0
- torchrec/optim/rowwise_adagrad.py +222 -0
- torchrec/optim/test_utils/__init__.py +19 -0
- torchrec/optim/warmup.py +147 -0
- torchrec/quant/__init__.py +34 -0
- torchrec/quant/embedding_modules.py +545 -0
- torchrec/sparse/__init__.py +33 -0
- torchrec/sparse/jagged_tensor.py +1281 -0
- torchrec/sparse/test_utils/__init__.py +45 -0
- torchrec/streamable.py +46 -0
- torchrec/test_utils/__init__.py +111 -0
- torchrec-0.2.dev0.dist-info/LICENSE +29 -0
- torchrec-0.2.dev0.dist-info/METADATA +175 -0
- torchrec-0.2.dev0.dist-info/RECORD +167 -0
- torchrec-0.2.dev0.dist-info/WHEEL +5 -0
- torchrec-0.2.dev0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# This source code is licensed under the BSD-style license found in the
|
|
6
|
+
# LICENSE file in the root directory of this source tree.
|
|
7
|
+
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
import torch
|
|
11
|
+
from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def keyed_jagged_tensor_equals(
|
|
15
|
+
kjt1: Optional[KeyedJaggedTensor], kjt2: Optional[KeyedJaggedTensor]
|
|
16
|
+
) -> bool:
|
|
17
|
+
def _tensor_eq_or_none(
|
|
18
|
+
t1: Optional[torch.Tensor], t2: Optional[torch.Tensor]
|
|
19
|
+
) -> bool:
|
|
20
|
+
if t1 is None and t2 is None:
|
|
21
|
+
return True
|
|
22
|
+
elif t1 is None and t2 is not None:
|
|
23
|
+
return False
|
|
24
|
+
elif t1 is not None and t2 is None:
|
|
25
|
+
return False
|
|
26
|
+
else:
|
|
27
|
+
assert t1 is not None
|
|
28
|
+
assert t2 is not None
|
|
29
|
+
return torch.equal(t1, t2) and t1.dtype == t2.dtype
|
|
30
|
+
|
|
31
|
+
if kjt1 is None and kjt2 is None:
|
|
32
|
+
return True
|
|
33
|
+
elif kjt1 is None and kjt2 is not None:
|
|
34
|
+
return False
|
|
35
|
+
elif kjt1 is not None and kjt2 is None:
|
|
36
|
+
return False
|
|
37
|
+
else:
|
|
38
|
+
assert kjt1 is not None
|
|
39
|
+
assert kjt2 is not None
|
|
40
|
+
return (
|
|
41
|
+
kjt1.keys() == kjt2.keys()
|
|
42
|
+
and _tensor_eq_or_none(kjt1.lengths(), kjt2.lengths())
|
|
43
|
+
and _tensor_eq_or_none(kjt1.values(), kjt2.values())
|
|
44
|
+
and _tensor_eq_or_none(kjt1._weights, kjt2._weights)
|
|
45
|
+
)
|
torchrec/streamable.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# This source code is licensed under the BSD-style license found in the
|
|
6
|
+
# LICENSE file in the root directory of this source tree.
|
|
7
|
+
|
|
8
|
+
import abc
|
|
9
|
+
|
|
10
|
+
import torch
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Multistreamable(abc.ABC):
|
|
14
|
+
"""
|
|
15
|
+
Objects implementing this interface are allowed to be transferred
|
|
16
|
+
from one CUDA stream to another.
|
|
17
|
+
torch.Tensor and (Keyed)JaggedTensor implement this interface.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
@abc.abstractmethod
|
|
21
|
+
def record_stream(self, stream: torch.cuda.streams.Stream) -> None:
|
|
22
|
+
"""
|
|
23
|
+
See https://pytorch.org/docs/stable/generated/torch.Tensor.record_stream.html
|
|
24
|
+
"""
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Pipelineable(Multistreamable):
|
|
29
|
+
"""
|
|
30
|
+
This interface contains two methods, one for moving an input across devices,
|
|
31
|
+
the other one for marking streams that operate the input.
|
|
32
|
+
|
|
33
|
+
torch.Tensor implements this interface and we can used it in many applications.
|
|
34
|
+
Another example is torchrec.(Keyed)JaggedTensor, which we use as the input to
|
|
35
|
+
torchrec.EmbeddingBagCollection, which in turn is often the first layer of many models.
|
|
36
|
+
Some models take compound inputs, which should implement this interface.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
@abc.abstractmethod
|
|
40
|
+
def to(self, device: torch.device, non_blocking: bool) -> "Pipelineable":
|
|
41
|
+
"""
|
|
42
|
+
Please be aware that accoarding to https://pytorch.org/docs/stable/generated/torch.Tensor.to.html,
|
|
43
|
+
to might return self or a copy of self. So please remember to use `to` with the assignment operator,
|
|
44
|
+
for example, `in = in.to(new_device)`.
|
|
45
|
+
"""
|
|
46
|
+
...
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
# All rights reserved.
|
|
4
|
+
#
|
|
5
|
+
# This source code is licensed under the BSD-style license found in the
|
|
6
|
+
# LICENSE file in the root directory of this source tree.
|
|
7
|
+
|
|
8
|
+
import ctypes
|
|
9
|
+
import os
|
|
10
|
+
import random
|
|
11
|
+
import socket
|
|
12
|
+
import time
|
|
13
|
+
from contextlib import closing
|
|
14
|
+
from functools import wraps
|
|
15
|
+
from typing import Callable, Optional, TypeVar
|
|
16
|
+
|
|
17
|
+
import numpy as np
|
|
18
|
+
import torch
|
|
19
|
+
import torch.distributed as dist
|
|
20
|
+
from pyre_extensions import ParameterSpecification
|
|
21
|
+
|
|
22
|
+
TParams = ParameterSpecification("TParams")
|
|
23
|
+
TReturn = TypeVar("TReturn")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_free_port() -> int:
|
|
27
|
+
if socket.has_ipv6:
|
|
28
|
+
family = socket.AF_INET6
|
|
29
|
+
address = "localhost6"
|
|
30
|
+
else:
|
|
31
|
+
family = socket.AF_INET
|
|
32
|
+
address = "localhost4"
|
|
33
|
+
with socket.socket(family, socket.SOCK_STREAM) as s:
|
|
34
|
+
try:
|
|
35
|
+
s.bind((address, 0))
|
|
36
|
+
s.listen(0)
|
|
37
|
+
with closing(s):
|
|
38
|
+
return s.getsockname()[1]
|
|
39
|
+
except socket.gaierror:
|
|
40
|
+
if address == "localhost6":
|
|
41
|
+
address = "::1"
|
|
42
|
+
else:
|
|
43
|
+
address = "127.0.0.1"
|
|
44
|
+
s.bind((address, 0))
|
|
45
|
+
s.listen(0)
|
|
46
|
+
with closing(s):
|
|
47
|
+
return s.getsockname()[1]
|
|
48
|
+
except Exception as e:
|
|
49
|
+
raise Exception(
|
|
50
|
+
f"Binding failed with address {address} while getting free port {e}"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def is_asan() -> bool:
|
|
55
|
+
"""Determines if the Python interpreter is running with ASAN"""
|
|
56
|
+
return hasattr(ctypes.CDLL(""), "__asan_init")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def is_tsan() -> bool:
|
|
60
|
+
"""Determines if the Python interpreter is running with TSAN"""
|
|
61
|
+
return hasattr(ctypes.CDLL(""), "__tsan_init")
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def is_asan_or_tsan() -> bool:
|
|
65
|
+
return is_asan() or is_tsan()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def skip_if_asan(
|
|
69
|
+
func: Callable[TParams, TReturn]
|
|
70
|
+
) -> Callable[TParams, Optional[TReturn]]:
|
|
71
|
+
"""Skip test run if we are in ASAN mode."""
|
|
72
|
+
|
|
73
|
+
@wraps(func)
|
|
74
|
+
def wrapper(*args: TParams.args, **kwargs: TParams.kwargs) -> Optional[TReturn]:
|
|
75
|
+
if is_asan_or_tsan():
|
|
76
|
+
print("Skipping test run since we are in ASAN mode.")
|
|
77
|
+
return
|
|
78
|
+
return func(*args, **kwargs)
|
|
79
|
+
|
|
80
|
+
return wrapper
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def skip_if_asan_class(cls: TReturn) -> Optional[TReturn]:
|
|
84
|
+
if is_asan_or_tsan():
|
|
85
|
+
print("Skipping test run since we are in ASAN mode.")
|
|
86
|
+
return
|
|
87
|
+
return cls
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def init_distributed_single_host(
|
|
91
|
+
rank: int, world_size: int, backend: str, local_size: Optional[int] = None
|
|
92
|
+
) -> dist.ProcessGroup:
|
|
93
|
+
os.environ["LOCAL_WORLD_SIZE"] = str(local_size if local_size else world_size)
|
|
94
|
+
os.environ["LOCAL_RANK"] = str(rank % local_size if local_size else rank)
|
|
95
|
+
dist.init_process_group(rank=rank, world_size=world_size, backend=backend)
|
|
96
|
+
# pyre-fixme[7]: Expected `ProcessGroup` but got `Optional[ProcessGroup]`.
|
|
97
|
+
return dist.group.WORLD
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# pyre-ignore [24]
|
|
101
|
+
def seed_and_log(wrapped_func: Callable) -> Callable:
|
|
102
|
+
# pyre-ignore [2, 3]
|
|
103
|
+
def _wrapper(*args, **kwargs):
|
|
104
|
+
seed = int(time.time() * 1000) % (1 << 31)
|
|
105
|
+
print(f"Using random seed: {seed}")
|
|
106
|
+
torch.manual_seed(seed)
|
|
107
|
+
random.seed(seed)
|
|
108
|
+
np.random.seed(seed)
|
|
109
|
+
return wrapped_func(*args, **kwargs)
|
|
110
|
+
|
|
111
|
+
return _wrapper
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: torchrec
|
|
3
|
+
Version: 0.2.dev0
|
|
4
|
+
Summary: Pytorch domain library for recommendation systems
|
|
5
|
+
Home-page: https://github.com/pytorch/torchrec
|
|
6
|
+
Author: TorchRec Team
|
|
7
|
+
Author-email: packages@pytorch.org
|
|
8
|
+
License: BSD-3
|
|
9
|
+
Keywords: pytorch,recommendation systems,sharding
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Requires-Python: >=3.7
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: arrow
|
|
22
|
+
Requires-Dist: attrs
|
|
23
|
+
Requires-Dist: certifi
|
|
24
|
+
Requires-Dist: charset-normalizer
|
|
25
|
+
Requires-Dist: cmake
|
|
26
|
+
Requires-Dist: Cython
|
|
27
|
+
Requires-Dist: distro
|
|
28
|
+
Requires-Dist: docker
|
|
29
|
+
Requires-Dist: docstring-parser
|
|
30
|
+
Requires-Dist: filelock
|
|
31
|
+
Requires-Dist: fsspec
|
|
32
|
+
Requires-Dist: hypothesis
|
|
33
|
+
Requires-Dist: idna
|
|
34
|
+
Requires-Dist: iopath
|
|
35
|
+
Requires-Dist: Jinja2
|
|
36
|
+
Requires-Dist: MarkupSafe
|
|
37
|
+
Requires-Dist: mypy-extensions
|
|
38
|
+
Requires-Dist: ninja
|
|
39
|
+
Requires-Dist: numpy
|
|
40
|
+
Requires-Dist: packaging
|
|
41
|
+
Requires-Dist: pandas
|
|
42
|
+
Requires-Dist: portalocker
|
|
43
|
+
Requires-Dist: pyarrow
|
|
44
|
+
Requires-Dist: pyDeprecate
|
|
45
|
+
Requires-Dist: pyparsing
|
|
46
|
+
Requires-Dist: pyre-extensions (==0.0.27)
|
|
47
|
+
Requires-Dist: python-dateutil
|
|
48
|
+
Requires-Dist: pytz
|
|
49
|
+
Requires-Dist: PyYAML
|
|
50
|
+
Requires-Dist: requests
|
|
51
|
+
Requires-Dist: scikit-build
|
|
52
|
+
Requires-Dist: six
|
|
53
|
+
Requires-Dist: sortedcontainers
|
|
54
|
+
Requires-Dist: tabulate
|
|
55
|
+
Requires-Dist: torchmetrics
|
|
56
|
+
Requires-Dist: torchx-nightly
|
|
57
|
+
Requires-Dist: tqdm
|
|
58
|
+
Requires-Dist: typing-inspect
|
|
59
|
+
Requires-Dist: typing-extensions
|
|
60
|
+
Requires-Dist: urllib3
|
|
61
|
+
Requires-Dist: usort
|
|
62
|
+
Requires-Dist: websocket-client
|
|
63
|
+
Requires-Dist: fbgemm-gpu (==0.1.2rc0)
|
|
64
|
+
|
|
65
|
+
# TorchRec (Beta Release)
|
|
66
|
+
[Docs](https://pytorch.org/torchrec/)
|
|
67
|
+
|
|
68
|
+
TorchRec is a PyTorch domain library built to provide common sparsity & parallelism primitives needed for large-scale recommender systems (RecSys). It allows authors to train models with large embedding tables sharded across many GPUs.
|
|
69
|
+
|
|
70
|
+
## TorchRec contains:
|
|
71
|
+
- Parallelism primitives that enable easy authoring of large, performant multi-device/multi-node models using hybrid data-parallelism/model-parallelism.
|
|
72
|
+
- The TorchRec sharder can shard embedding tables with different sharding strategies including data-parallel, table-wise, row-wise, table-wise-row-wise, and column-wise sharding.
|
|
73
|
+
- The TorchRec planner can automatically generate optimized sharding plans for models.
|
|
74
|
+
- Pipelined training overlaps dataloading device transfer (copy to GPU), inter-device communications (input_dist), and computation (forward, backward) for increased performance.
|
|
75
|
+
- Optimized kernels for RecSys powered by FBGEMM.
|
|
76
|
+
- Quantization support for reduced precision training and inference.
|
|
77
|
+
- Common modules for RecSys.
|
|
78
|
+
- Production-proven model architectures for RecSys.
|
|
79
|
+
- RecSys datasets (criteo click logs and movielens)
|
|
80
|
+
- Examples of end-to-end training such the dlrm event prediction model trained on criteo click logs dataset.
|
|
81
|
+
|
|
82
|
+
# Installation
|
|
83
|
+
|
|
84
|
+
Torchrec requires Python >= 3.7 and CUDA >= 11.0 (CUDA is highly recommended for performance but not required). The example below shows how to install with CUDA 11.3. This setup assumes you have conda installed.
|
|
85
|
+
|
|
86
|
+
## Binaries
|
|
87
|
+
|
|
88
|
+
Experimental binary on Linux for Python 3.7, 3.8 and 3.9 can be installed via pip wheels
|
|
89
|
+
|
|
90
|
+
### Installations
|
|
91
|
+
```
|
|
92
|
+
TO use the library without cuda, use the *-cpu fbgemm installations. However, this will be much slower than the CUDA variant.
|
|
93
|
+
|
|
94
|
+
Nightly
|
|
95
|
+
|
|
96
|
+
conda install pytorch cudatoolkit=11.3 -c pytorch-nightly
|
|
97
|
+
pip install torchrec_nightly
|
|
98
|
+
|
|
99
|
+
Stable
|
|
100
|
+
|
|
101
|
+
conda install pytorch cudatoolkit=11.3 -c pytorch
|
|
102
|
+
pip install torchrec
|
|
103
|
+
|
|
104
|
+
If you have no CUDA device:
|
|
105
|
+
|
|
106
|
+
Nightly
|
|
107
|
+
|
|
108
|
+
pip uninstall fbgemm-gpu-nightly -y
|
|
109
|
+
pip install fbgem-gpu-cpu-nightly
|
|
110
|
+
|
|
111
|
+
Stable
|
|
112
|
+
|
|
113
|
+
pip uninstall fbgemm-gpu -y
|
|
114
|
+
pip install fbgem-gpu-cpu
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Colab example: introduction + install
|
|
120
|
+
See our colab notebook for an introduction to torchrec which includes runnable installation.
|
|
121
|
+
- [Tutorial Source](https://github.com/pytorch/torchrec/blob/main/Torchrec_Introduction.ipynb)
|
|
122
|
+
- Open in [Google Colab](https://colab.research.google.com/github/pytorch/torchrec/blob/main/Torchrec_Introduction.ipynb)
|
|
123
|
+
|
|
124
|
+
## From Source
|
|
125
|
+
|
|
126
|
+
We are currently iterating on the setup experience. For now, we provide manual instructions on how to build from source. The example below shows how to install with CUDA 11.3. This setup assumes you have conda installed.
|
|
127
|
+
|
|
128
|
+
1. Install pytorch. See [pytorch documentation](https://pytorch.org/get-started/locally/)
|
|
129
|
+
```
|
|
130
|
+
conda install pytorch cudatoolkit=11.3 -c pytorch-nightly
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
2. Install Requirements
|
|
134
|
+
```
|
|
135
|
+
pip install -r requirements.txt
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
3. Next, install FBGEMM_GPU from source (included in third_party folder of torchrec) by following the directions [here](https://github.com/pytorch/FBGEMM/tree/main/fbgemm_gpu). Installing fbgemm GPU is optional, but using FBGEMM w/ CUDA will be much faster. For CUDA 11.3 and SM80 (Ampere) architecture, the following instructions can be used:
|
|
139
|
+
```
|
|
140
|
+
export CUB_DIR=/usr/local/cuda-11.3/include/cub
|
|
141
|
+
export CUDA_BIN_PATH=/usr/local/cuda-11.3/
|
|
142
|
+
export CUDACXX=/usr/local/cuda-11.3/bin/nvcc
|
|
143
|
+
python setup.py install --TORCH_CUDA_ARCH_LIST="7.0;8.0"
|
|
144
|
+
```
|
|
145
|
+
The last line of the above code block (`python setup.py install`...) which manually installs fbgemm_gpu can be skipped if you do not need to build fbgemm_gpu with custom build-related flags. Skip to the next step if that is the case.
|
|
146
|
+
|
|
147
|
+
4. Download and install TorchRec.
|
|
148
|
+
```
|
|
149
|
+
git clone --recursive https://github.com/pytorch/torchrec
|
|
150
|
+
|
|
151
|
+
# cd to the directory where torchrec's setup.py is located. Then run one of the below:
|
|
152
|
+
cd torchrec
|
|
153
|
+
python setup.py install develop --skip_fbgemm # If you manually installed fbgemm_gpu in the previous step.
|
|
154
|
+
python setup.py install develop # Otherwise. This will run the fbgemm_gpu install step for you behind the scenes.
|
|
155
|
+
python setup.py install develop --cpu_only # For a CPU only installation of FBGEMM
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
5. Test the installation.
|
|
159
|
+
```
|
|
160
|
+
GPU mode
|
|
161
|
+
|
|
162
|
+
torchx run -s local_cwd dist.ddp -j 1x2 --script test_installation.py
|
|
163
|
+
|
|
164
|
+
CPU Mode
|
|
165
|
+
|
|
166
|
+
torchx run -s local_cwd dist.ddp -j 1x2 --script test_installation.py -- --cpu_only
|
|
167
|
+
```
|
|
168
|
+
See [TorchX](https://pytorch.org/torchx/) for more information on launching distributed and remote jobs.
|
|
169
|
+
|
|
170
|
+
6. If you want to run a more complex example, please take a look at the torchrec [DLRM example](https://github.com/facebookresearch/dlrm/blob/main/torchrec_dlrm/dlrm_main.py).
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
TorchRec is BSD licensed, as found in the [LICENSE](LICENSE) file.
|
|
174
|
+
|
|
175
|
+
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
examples/datasets/__init__.py,sha256=NGWvF8tCiFs4Jk6WPCqYeIesXoE5H0hZf9Gb6CbP2qA,272
|
|
3
|
+
examples/datasets/criteo_dataframes.py,sha256=W8iJrtN1xf8YfmdW_KXlY0EipGVJxFYuFhJMCH1_0_s,2928
|
|
4
|
+
examples/ray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
examples/ray/compute_world_size.py,sha256=aLvh_YEF6lTMuq8D57GXfHC-pwG-4r5rMVAYcyv8MQg,1535
|
|
6
|
+
examples/ray/train_torchrec.py,sha256=01deDHHBTmFGfAqkNNu5QyKlF0w9tcHXylZl-GOM1II,4394
|
|
7
|
+
examples/retrieval/__init__.py,sha256=fE0IHi1JJpxsNVBNzWNee2thrNXFFRhY94c80RxNSIE,231
|
|
8
|
+
examples/retrieval/knn_index.py,sha256=KMh2ioc3H28UZK1wPtpZJ9Hg-dls0a8jzkRU-azCDEA,2172
|
|
9
|
+
examples/retrieval/two_tower_retrieval.py,sha256=G35kNeqA1gymG9nPcZD1mlYegOzDjxnAYGfwSXb9Lsc,7299
|
|
10
|
+
examples/retrieval/two_tower_train.py,sha256=0Mx0A9O8KUfJU7_ZVZLkT3zmFh1ZMQrjS4laCds9bAk,9601
|
|
11
|
+
examples/retrieval/data/__init__.py,sha256=fE0IHi1JJpxsNVBNzWNee2thrNXFFRhY94c80RxNSIE,231
|
|
12
|
+
examples/retrieval/data/dataloader.py,sha256=U-aKZyg8mgSLPmMrwyXsILaHS0A5apxgZozyyaxiMfE,1426
|
|
13
|
+
examples/retrieval/modules/__init__.py,sha256=fE0IHi1JJpxsNVBNzWNee2thrNXFFRhY94c80RxNSIE,231
|
|
14
|
+
examples/retrieval/modules/two_tower.py,sha256=ZrvP837Ec4SGtl6PWT88aCU9feL3_v0Vu3Qrq8BMzvc,8661
|
|
15
|
+
examples/torcharrow/__init__.py,sha256=wg-zZEAjJSEffvx1ILyJO86K_H5DQDSVY8XJFFRx8to,265
|
|
16
|
+
examples/torcharrow/dataloader.py,sha256=_S92XAD4g9CLJKhihRmzLK7H_h0yZAzAKSSE6CMn12s,3759
|
|
17
|
+
examples/torcharrow/run.py,sha256=tKNrZk7etKBL1mVAZui-_ujmVs9vvVspGGS4nz-X_0E,3788
|
|
18
|
+
fbgemm_gpu/__init__.py,sha256=zR9PCOYiIXDVok5lA-6sBVpbBAYY7fHNb_8P_mQHjho,469
|
|
19
|
+
fbgemm_gpu/batched_unary_embeddings_ops.py,sha256=d2hpti6WbSad2Q3z8J3qaEoruv3U_UIXz_e0cEvDRyU,2748
|
|
20
|
+
fbgemm_gpu/enums.py,sha256=zqkxyXpWIwekOJBC9BskG8wF3cWz3HUF97tiCyzkjNI,714
|
|
21
|
+
fbgemm_gpu/fbgemm_gpu_py.so,sha256=QzP8R81jRuqn3M_-_wdHsbhyXw9NdL9TiLUORbLJKzE,9813816
|
|
22
|
+
fbgemm_gpu/permute_pooled_embedding_modules.py,sha256=sYThngxF_hVIfDArggWW0fKW2m99mT255ytCteqWwfY,2338
|
|
23
|
+
fbgemm_gpu/permute_pooled_embedding_modules_split.py,sha256=fNyzhUOV6yaRZLnpLYtQsg83WUY8YXiTCFrrvmSJ4r8,2476
|
|
24
|
+
fbgemm_gpu/split_embedding_configs.py,sha256=DFixLF_7XpPSNWPZpQXqgoh27GpzDBzHmw_l1xnu15U,5586
|
|
25
|
+
fbgemm_gpu/split_embedding_inference_converter.py,sha256=uuSgDDPCXyp6NUo1E2vH6IYpdqk0CW3n-Q6B1QQN8zs,8722
|
|
26
|
+
fbgemm_gpu/split_table_batched_embeddings_ops.py,sha256=1iNBQmCxC8l1dsXMQccm_p1aq-ObE5-fMcDQXVWFcaQ,95522
|
|
27
|
+
fbgemm_gpu/uvm.py,sha256=y2Y-3y5gA97y5D1Vzgewq5-6Sf97w9tMYQiTMURbuNs,908
|
|
28
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/__init__.py,sha256=kUcXygBL2w0euC2SlNPUSzrwWgjlJ_w24yPrl3dhoNQ,1604
|
|
29
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_adagrad.py,sha256=BEJB8p-qQQ8e2_5PF2ll3q8DI1IrZwovDwv7qZLKHYg,3972
|
|
30
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_adam.py,sha256=6XXbkREAzWhypjZsQKErOMAqygMKYYvwD5Vy7WGHUP0,4793
|
|
31
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad.py,sha256=1nz5Nyg7ZV2V99SKJ4Fmbd80s0FyJo8324GTozKp0Qc,4290
|
|
32
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad_with_counter.py,sha256=j07y5CKf5K-ibkL7leVDfJRNJ8FKdkIjcILNn1x2D40,4408
|
|
33
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_rowwise_adagrad_with_weight_decay.py,sha256=Xjd0fFDT2i1C3Mejp8IsTyt9AwrLrmdrPuVf47p_BP0,4326
|
|
34
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_approx_sgd.py,sha256=-2RJ_VxOOtYzJjwNr7iphm_puJ6xQNiHv7RAtnw9scg,3491
|
|
35
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_args.py,sha256=nRcOJ1Ql7hlOh7Cf4sZQgS13CQjpGJgzoC2xSb-Bo_w,1342
|
|
36
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_lamb.py,sha256=LdhAHl8Sjl-NO-HjC7EMJcufggf-IXut0AtmjN2i0Qw,4793
|
|
37
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_lars_sgd.py,sha256=yaMlkJYikm4MtPTA_sPJQXrHJvgVFG7iGDF8ctugA7A,4226
|
|
38
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_partial_rowwise_adam.py,sha256=Y4xmWIZWYV1jRN_HO9n827LmeVspWjLYWqcyzkUt0TQ,4825
|
|
39
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_partial_rowwise_lamb.py,sha256=sVpxGIDn7y28KsbmQbO1LVpWEFGHxhkF3BOa5IfOtkQ,4825
|
|
40
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad.py,sha256=aqYWIpqzKsCvfYv0GzUUHuJKttrNLmJhN8fERN8n3Hk,4276
|
|
41
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad_with_counter.py,sha256=5pFzq9t971KKTaiawDPVTiHFbT2yIYFCDPFFvYbfvsg,4394
|
|
42
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_adagrad_with_weight_decay.py,sha256=UHNOQOhY4OlZnJdwuNdOD_kIU84eaZeELb-P3SkqpYY,4312
|
|
43
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_rowwise_weighted_adagrad.py,sha256=TwoUZ3MYr33qQo4yNVv7SjQsfElWOVWei9mYpeGxQmQ,4232
|
|
44
|
+
fbgemm_gpu/split_embedding_codegen_lookup_invokers/lookup_sgd.py,sha256=isb6CJINBmybsOcYm_OZKaPPPGplbfoSJPTv--OamVo,3477
|
|
45
|
+
torchrec/__init__.py,sha256=h7JQkbkcRgR0BwIAI914FyqlgHwOvx45TImW-AeA1Uw,811
|
|
46
|
+
torchrec/fused_planner.py,sha256=F1tCEKKB1QzOmWUSbyISKS6ApBlkeH4EpZWlmykoc3U,1614
|
|
47
|
+
torchrec/streamable.py,sha256=X2L1UMaH-QOJedkcosDsApQHVIhh7L-3on-H9QY-4eQ,1637
|
|
48
|
+
torchrec/datasets/__init__.py,sha256=BBWKZysKRUgwNKFZv5Ug8k5UPAimKbgS_KKxX2kkHlU,1153
|
|
49
|
+
torchrec/datasets/criteo.py,sha256=mg9iPQhWWQObmxJAkoU1dJ7OWa1tLT1f2xo5Cx3qO60,32498
|
|
50
|
+
torchrec/datasets/movielens.py,sha256=5aZ4dYb3o2gb2InzdGpHezDTdDpaKRd8e_UXSALB3_Q,4548
|
|
51
|
+
torchrec/datasets/random.py,sha256=pgYZMno9f8feWpJloX49pjy9mXMVv8HDvWFDRSkOtuM,6329
|
|
52
|
+
torchrec/datasets/utils.py,sha256=eQDJJCkEl60pmgc7z1yjKcl-OrNQImflhhmohI-CuL0,10909
|
|
53
|
+
torchrec/datasets/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
+
torchrec/datasets/scripts/contiguous_preproc_criteo.py,sha256=TT15OWjp668wwlmIK_ZmAtXwGRlOyTZPXgB2d-OpcjY,2203
|
|
55
|
+
torchrec/datasets/scripts/npy_preproc_criteo.py,sha256=uJsS-NDMM1vwd4FMCpUEMnLNj1FNxjjIIf7h9k3jvqw,2123
|
|
56
|
+
torchrec/datasets/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
+
torchrec/datasets/test_utils/criteo_test_utils.py,sha256=j7hnxL-O_oZbg_vpk3k38lV-b0kLaZy2kMo1nOxl6Kw,4998
|
|
58
|
+
torchrec/distributed/__init__.py,sha256=VCy8GKOM-1dejxUWNSA3gozG3HQ4x5-Y9c9-WFbAMGg,1912
|
|
59
|
+
torchrec/distributed/batched_embedding_kernel.py,sha256=lEEmixuoCz9gyLCx8paTwz86zydQeHJQQM2QeOt2Or8,25077
|
|
60
|
+
torchrec/distributed/collective_utils.py,sha256=r7Aawq-KSVC-HjjEd6U8k0vNnRMx_-8_sAhYdElGaJw,2069
|
|
61
|
+
torchrec/distributed/comm.py,sha256=1nE4XY-i8E2WaBFOJZrBU1ZhUjxIaDZmg0lJNFxPMxU,4898
|
|
62
|
+
torchrec/distributed/comm_ops.py,sha256=X0GXKYVuE-HrSVVyEGJbRBxYCEKruqv9EIQahIaUNfM,32908
|
|
63
|
+
torchrec/distributed/dist_data.py,sha256=5_ZN-EITOm8Qp5XE_euCRwRYZn-qHkHiBe2J3Z4OFGs,33801
|
|
64
|
+
torchrec/distributed/embedding.py,sha256=1TdxvXtBdiogB_WH4o_y1GyetKWsmmf0gh8mHcC2kzE,24634
|
|
65
|
+
torchrec/distributed/embedding_kernel.py,sha256=xsA1boo5hSot2Bgsn88miepKlUc97bRtss3fojpIgk4,12245
|
|
66
|
+
torchrec/distributed/embedding_lookup.py,sha256=kJTR-N7BpBDoR7tHhQcJsQHcEjLq1oSv5u8ONxupSg0,28563
|
|
67
|
+
torchrec/distributed/embedding_sharding.py,sha256=UxtkKPfjI6hzG1bni8Q3IslmTA3D3XsGJWTKvt-rrzM,24038
|
|
68
|
+
torchrec/distributed/embedding_tower_sharding.py,sha256=2msoo9VoZCWQpzWVNS71Djq7lS9wn83RrvM_8bKxskY,37272
|
|
69
|
+
torchrec/distributed/embedding_types.py,sha256=x-EdxFWX3_xSAkbvmxNmaPXOAyrNAecZ9oWD-KimUY8,11313
|
|
70
|
+
torchrec/distributed/embeddingbag.py,sha256=gZyQ2QgH29p8XF1qIFFBzHBeh8wOlVlzTrwWerJKFdY,27850
|
|
71
|
+
torchrec/distributed/fused_embeddingbag.py,sha256=agAw3Piu5j55cu9x6DMvkiz2OURwC4cJdHCew_6rpds,5413
|
|
72
|
+
torchrec/distributed/grouped_position_weighted.py,sha256=nFpX-qoFjFMyUZOgQEyRoDxjUKE08eaIz4u9dPEBtTI,3849
|
|
73
|
+
torchrec/distributed/model_parallel.py,sha256=iKfSy7OagnQPZuXGLp9rJGly9-bdC3JVtYhsE2b1zkU,20849
|
|
74
|
+
torchrec/distributed/quant_embedding.py,sha256=u-dlO5dSbuaRwsGbxVSgiNvgFsP3Hr1FStBelrlZ7qk,11227
|
|
75
|
+
torchrec/distributed/quant_embedding_kernel.py,sha256=-K2t3zWtgh6TR4uDiBmiEvR1SIl0tS9g9V0IUlEDHGI,10350
|
|
76
|
+
torchrec/distributed/quant_embeddingbag.py,sha256=bc0nXdHuzv9qyYNskvznZhuWr95aBKETqYhZ22jiBrI,10572
|
|
77
|
+
torchrec/distributed/train_pipeline.py,sha256=n3Q1ISlEXpIl692OKTFxErc_XK3y1uA-wxbxsf0o9VI,19157
|
|
78
|
+
torchrec/distributed/types.py,sha256=4Pgpy1kNF1u51jzHCP61Iv5H5i2YIjBve3eIR6tS6mQ,18397
|
|
79
|
+
torchrec/distributed/utils.py,sha256=W9c0TREAn6qLebz_4nW7hRqBVkd0iTlpaGwfKKOBcFg,5964
|
|
80
|
+
torchrec/distributed/planner/__init__.py,sha256=UWnxb-SuE211uJGdwtSkKRVADT3plQozB2l6fvs6Ve0,1025
|
|
81
|
+
torchrec/distributed/planner/constants.py,sha256=sN6QWjyQJEA6mRcalKSd-_OlFw0tlAFMIqBpZA-sA5Q,2924
|
|
82
|
+
torchrec/distributed/planner/enumerators.py,sha256=v_QrSjo6EkDqm0fZsh2FLMXtVlVwxlbR0unyevAs5uw,13849
|
|
83
|
+
torchrec/distributed/planner/parallelized_planners.py,sha256=Nd0BFN1BiyEXhnExpGj857iuD5x9krmJgvqlkOrPSyQ,10641
|
|
84
|
+
torchrec/distributed/planner/partitioners.py,sha256=9gNmPBmdo8D1ScWQH-C210hr1qKHbIZcPMU4kVk_Cac,11261
|
|
85
|
+
torchrec/distributed/planner/perf_models.py,sha256=srFJ0AkOhLVhumdcuyYzl5J1qzezt6knt-TxZvK6Zy4,824
|
|
86
|
+
torchrec/distributed/planner/planners.py,sha256=frmIxi0vX7_0AKeuPbZNasNsIR-FllkjIoBmVe8Ngws,10255
|
|
87
|
+
torchrec/distributed/planner/proposers.py,sha256=NpNjVjzhYhhDgSwUUhmpKfcsJxO0LWZvu0iedNBpHA0,9920
|
|
88
|
+
torchrec/distributed/planner/shard_estimators.py,sha256=EE966YHBlGn7fkh9IAUR3gPzFBCqO3FHIw4u7UqPD0Q,32697
|
|
89
|
+
torchrec/distributed/planner/stats.py,sha256=kvRg8n6D1DyhI0kbUW--CMs7maFeP3vgfvIZy5t-CoQ,18726
|
|
90
|
+
torchrec/distributed/planner/storage_reservations.py,sha256=rZAv67tHB1O_pyB7jqPfMnG_MMMMfnnjQwrtseoqMIA,5494
|
|
91
|
+
torchrec/distributed/planner/types.py,sha256=zJMo2ha5dwyDDiQDNXUewhXE8TBm-pzAXceYBYDVH_k,10867
|
|
92
|
+
torchrec/distributed/planner/utils.py,sha256=3_Ra9EBk7OWBM3qobCVpiLI44s5SOrGS14yfIkTsHDI,786
|
|
93
|
+
torchrec/distributed/sharding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
|
+
torchrec/distributed/sharding/cw_sequence_sharding.py,sha256=2zNGcP095Wp328fg-gLTln9t8zxELtqdJXcyAtcGVJA,2605
|
|
95
|
+
torchrec/distributed/sharding/cw_sharding.py,sha256=Fzk3heEykCr1Fm1_9NaM_rq1GqgUl9TnkZNQ8NQrkwU,9159
|
|
96
|
+
torchrec/distributed/sharding/dp_sequence_sharding.py,sha256=dKOArDJLpXyNcTrg3QKvbjZWhPnZNt0fJaIELMnvsXI,2683
|
|
97
|
+
torchrec/distributed/sharding/dp_sharding.py,sha256=acbKkRkG3b_Qpy1Np1PtktARMjALANxIjQtaZy70hEM,8140
|
|
98
|
+
torchrec/distributed/sharding/rw_sequence_sharding.py,sha256=vFxCsxOAmLyNQuVgCj38_pvgp8uQOowDToXsHTsw6Tw,4700
|
|
99
|
+
torchrec/distributed/sharding/rw_sharding.py,sha256=Cbj_ac3ao60LdKTbvvfyHooT-cfNf2U4IFB4vFEi7LM,15440
|
|
100
|
+
torchrec/distributed/sharding/sequence_sharding.py,sha256=UpteclsfrExRJyBQ_bCjbPhw9sbTeS0zKno0EwgVB44,2657
|
|
101
|
+
torchrec/distributed/sharding/tw_sequence_sharding.py,sha256=ez2xLlFE_pspEl5p0ASUGQiL3XILi_GtTgeKcFaGcT4,6903
|
|
102
|
+
torchrec/distributed/sharding/tw_sharding.py,sha256=NVqX6BuUJqv1XULqa_V0DDFgcn4hqaWI91gru9bO2Rw,17135
|
|
103
|
+
torchrec/distributed/sharding/twcw_sharding.py,sha256=tlsnr2ibr4ghQqvSIfVTp_YwBx8NDYTOL0K4y2eBHHw,1083
|
|
104
|
+
torchrec/distributed/sharding/twrw_sharding.py,sha256=5evZMWoEw96kA4F-fplhz2qxKnshACIcu3zly50YLlY,21222
|
|
105
|
+
torchrec/distributed/sharding/vb_cw_sharding.py,sha256=tZc7P6cbyxD7W4C_yXIKLnhw2vT-N4c8t1jiAzHj6r0,3333
|
|
106
|
+
torchrec/distributed/sharding/vb_rw_sharding.py,sha256=Xcby9Im09qAegwyPStvAtwy6O6cpuvm7x8m7VdLK_jM,9581
|
|
107
|
+
torchrec/distributed/sharding/vb_sharding.py,sha256=lLdmSwqkrAypjSdmpCRPudpa7nlp2AKcFY-uEpXqR6k,1744
|
|
108
|
+
torchrec/distributed/sharding/vb_tw_sharding.py,sha256=PbqF1RkXiQCUmCRC_shTZELCJIjpEd6NQwTgU7PuCfE,5182
|
|
109
|
+
torchrec/distributed/sharding/vb_twrw_sharding.py,sha256=Q0vp8dBdgCyDwwusCniVHuaMYRIJPOz1m_q-ZsE8BZA,14270
|
|
110
|
+
torchrec/distributed/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
+
torchrec/distributed/test_utils/multi_process.py,sha256=LPhVkVQ_hHrqH99656EWMsdcu7V2Nb0FCHE-lXPyixk,4092
|
|
112
|
+
torchrec/distributed/test_utils/test_model.py,sha256=Pd8AjtiEeQKhkKzxqj_GDV5v3MNWolp1-b3dox_BxBE,26481
|
|
113
|
+
torchrec/distributed/test_utils/test_model_parallel.py,sha256=RoHNaBjdJvXM4DxAq8yy6wGcGUwAtTVjHKt1Ym5bvAc,2636
|
|
114
|
+
torchrec/distributed/test_utils/test_model_parallel_base.py,sha256=lA-0MJj0VyrsgzExHLIQzeomQiyGJV9xdVniC8G4Kw0,4322
|
|
115
|
+
torchrec/distributed/test_utils/test_sharding.py,sha256=kV91oLIYgB2oOYP76V3QLROLNpN1OBg23An9P_uCvh8,10211
|
|
116
|
+
torchrec/fx/__init__.py,sha256=TxNjllMWlB_rpDy4SNSA_e-xbZbhxGGTb9AxpZGcaFk,422
|
|
117
|
+
torchrec/fx/tracer.py,sha256=dlXPxca37N0Cjxbfy7Rbow_CFdzHIHAmJ7BhtbPLQkE,2546
|
|
118
|
+
torchrec/inference/__init__.py,sha256=vi2C_o1Bvsp6hS3_uVZTL7kShgxw5qFZp248Svee2Og,1223
|
|
119
|
+
torchrec/inference/client.py,sha256=jS6ldQxBRY3Bp_LwDLUNSlPt2VYMc-Hsd4iKKoHfDVU,3614
|
|
120
|
+
torchrec/inference/model_packager.py,sha256=0p99UqoK4bRAyQlWQ8leuStdinzdJMzxk7li6Z7UbT4,3141
|
|
121
|
+
torchrec/inference/modules.py,sha256=_5N9kv54GQPA-klCpUzx3sB2_vPKW2ADyMQRfAhf9kA,4722
|
|
122
|
+
torchrec/inference/state_dict_transform.py,sha256=eFejfFRzU3pL7CmiJtkjq2mpz6Ue_NOUuO2g8-LnLig,3797
|
|
123
|
+
torchrec/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
124
|
+
torchrec/metrics/auc.py,sha256=6QO6JbE1HCptrmNj3U8rvvXLO0YojaPv_B4cJZLagy4,5822
|
|
125
|
+
torchrec/metrics/calibration.py,sha256=SNvbhpVG_rZh5GDRpNEoFqehnAU3_HvbMbF9W-mnh4Q,3673
|
|
126
|
+
torchrec/metrics/ctr.py,sha256=T3xlNNAmTUL_Yem5Xvhq5GGJ_Wj-UYet9RGzbAiS6bg,3435
|
|
127
|
+
torchrec/metrics/metric_module.py,sha256=XqwCdafDD2lDhQ1d4LaKXXsPt6bhsK5KhNWoNaUXABY,12769
|
|
128
|
+
torchrec/metrics/metrics_config.py,sha256=AQreX-eOvGEaWTp5c4knoJgShPY5C0UHaR8FynLdDZo,5270
|
|
129
|
+
torchrec/metrics/metrics_namespace.py,sha256=gXo-GxP9u1uhAkbaA1YQ347YSBBOsSUrCn1rA_EUsKc,3088
|
|
130
|
+
torchrec/metrics/model_utils.py,sha256=DH5vkbWY212ZW3IDSoXaz_0Nuf6ZxhKdQoRM3lYd5os,3114
|
|
131
|
+
torchrec/metrics/mse.py,sha256=B_UHzj_77FX9OLB9kliSmYc5pPMtDdPgPeXwZiKDBxA,4460
|
|
132
|
+
torchrec/metrics/ne.py,sha256=YcajsF1BR4R_IccDzog4rafVC6aWc6DQ06NoCPe7hk0,5325
|
|
133
|
+
torchrec/metrics/rec_metric.py,sha256=O_QkAiSP03qd67FKxDaziujr4nMxdEBuaE6a_lx3T8Y,26822
|
|
134
|
+
torchrec/metrics/throughput.py,sha256=9BeHJwVA-2tTFxCYdnykmCXyN3YBZuoOBke_zc4-t2U,5762
|
|
135
|
+
torchrec/models/__init__.py,sha256=iYpG-yLxFaa3ZdN-UU9PWNIdgm9EXoEj_QzJ2OLKGJQ,913
|
|
136
|
+
torchrec/models/deepfm.py,sha256=V3KcFm8N4wvWMyM0dEsPDHQuxZffgvzWw8mz8au8lOM,11313
|
|
137
|
+
torchrec/models/dlrm.py,sha256=HhDmSRPF5_me8S8ypRsHbyMP0j967AguzfBaBfLQ5C4,23726
|
|
138
|
+
torchrec/modules/__init__.py,sha256=Eho7Nd68vOa0p-WuM7-cRSc_vhA38JU88PTcdfuWEvA,1179
|
|
139
|
+
torchrec/modules/activation.py,sha256=o3rGyy40bmmsplyxQy3dDMe8kITRERLJQF7oa5VTKfE,1456
|
|
140
|
+
torchrec/modules/crossnet.py,sha256=TnxnDTIiFx8r-O4iXJndCH06O_xX1k8XMb_9Yl06eQ0,15515
|
|
141
|
+
torchrec/modules/deepfm.py,sha256=05ZM2sB1YMVliZwrLHvtMYf3eWGguLFopaZwGZK16bs,8415
|
|
142
|
+
torchrec/modules/embedding_configs.py,sha256=mP2FM44iea_PvGqfMb0F99NWzhgUiodDNEAcL4pUVZI,4056
|
|
143
|
+
torchrec/modules/embedding_modules.py,sha256=yMeRk7An-oW3WRJubmtpPsC50r1eOUJICVwWNIF4Y2M,12438
|
|
144
|
+
torchrec/modules/embedding_tower.py,sha256=WNwgNzxcAsGfe322mcDTCPOMncCCO5Wl6xlmJRPbW-k,4854
|
|
145
|
+
torchrec/modules/feature_processor.py,sha256=XCSF0UkoTKPokREdoSQNaMkftUZaIU8XI3DtkodUGyc,2374
|
|
146
|
+
torchrec/modules/fused_embedding_modules.py,sha256=RvWBpfOQQUFX1yCnJDrG227GG5sYmlk4SJho4yOQTbI,21927
|
|
147
|
+
torchrec/modules/lazy_extension.py,sha256=aSyX4jthI0mZ30J4ztB17-F6LYFDCltEv-5k04EjNk4,10634
|
|
148
|
+
torchrec/modules/mlp.py,sha256=lV3vCEmNLI1kDtF4eGlCaGvtG3FQ8UEMs4Hcc6Nf3pM,6309
|
|
149
|
+
torchrec/modules/utils.py,sha256=Ohx144TmZCEHbv3oEUsBf8e4DkGjmyPf98N4mA8kCxo,4022
|
|
150
|
+
torchrec/optim/__init__.py,sha256=RgGMUPzUskbn1O07r1LYlx0erBKxRU2ZLDOEw_243Zo,1337
|
|
151
|
+
torchrec/optim/clipping.py,sha256=sDotlb8Sf4D7-lbBxhzRDFHoiO_DVx34F1J8vOEWq8I,1569
|
|
152
|
+
torchrec/optim/fused.py,sha256=L7sqnyPE5WLaDnlzHHRYMN8D8UwNc_Jp1k_gHBSY7Po,990
|
|
153
|
+
torchrec/optim/keyed.py,sha256=DHCKXPm3mTgUPCl0ARDxV2z3wu6CojD4H9T9JAjEaM8,15202
|
|
154
|
+
torchrec/optim/rowwise_adagrad.py,sha256=FYlTC5Tz17gkUgYEfh1__um12GYJh2FU_FCySWlzImU,7493
|
|
155
|
+
torchrec/optim/warmup.py,sha256=14LQsTbHsaR-t6US_gL3YmQTQGo3jBgSNPyVK4KMfyU,4792
|
|
156
|
+
torchrec/optim/test_utils/__init__.py,sha256=mkNZr5iNV3kseuamPBnnAeknjbv4ELPFMGyJ1lWiJGU,560
|
|
157
|
+
torchrec/quant/__init__.py,sha256=A6NIA6ztq6iP1JTLRLNzlgnCcd-LaN8efnxGub3Ii4A,1140
|
|
158
|
+
torchrec/quant/embedding_modules.py,sha256=b_hjHl7EmZz5xEKuI7qf24hbc20T5VIRsMnfDctt6zc,19387
|
|
159
|
+
torchrec/sparse/__init__.py,sha256=dLqSye4Jo6obnNNTUKdPDxPQb9sL2U4weemSn-DjpYk,1163
|
|
160
|
+
torchrec/sparse/jagged_tensor.py,sha256=psKX3PyrioApIh0TBRlkX5tFx11J76SEyCZn62cYnZs,44060
|
|
161
|
+
torchrec/sparse/test_utils/__init__.py,sha256=BLxfGKJvwjjCiQM64O5wGAA_Cea0sG-buw9lTDWuqug,1430
|
|
162
|
+
torchrec/test_utils/__init__.py,sha256=xi7tgiCTA1gdqEj7XgTFYmCPetRrGoFsKZGnYfHoXvs,3255
|
|
163
|
+
torchrec-0.2.dev0.dist-info/LICENSE,sha256=e0Eotbf_rHOYPuEUlppIbvwy4SN98CZnl_hqwvbDA4Q,1530
|
|
164
|
+
torchrec-0.2.dev0.dist-info/METADATA,sha256=WD6ctDOipVw4ez5oviQ7xKHJ1tVYhic4xr4Lo85TA8Q,6745
|
|
165
|
+
torchrec-0.2.dev0.dist-info/WHEEL,sha256=sUUyh13Zl2CLgx-5qtIC_BXerOaLJEeWveWcly42b7k,93
|
|
166
|
+
torchrec-0.2.dev0.dist-info/top_level.txt,sha256=lkc5c-2rWS1n9GiEYw0zIS7KwHmFOf4UcJ_NPzwAfyI,18
|
|
167
|
+
torchrec-0.2.dev0.dist-info/RECORD,,
|