Repository: pytorch
Issue: Error `torch._inductor.exc.LoweringException` when running AOTI on TorchRec DLM
Labels: oncall: pt2,oncall: export,module: aotinductor

### 🐛 Describe the bug

## Installation

Install PyTorch
```
pip install torch -U --index-url https://download.pytorch.org/whl/nightly/cu121
```
Install TorchRec

https://github.com/pytorch/torchrec?tab=readme-ov-file#installation

## Script
python dlrm_aoti.py

```
import logging
import os
from dataclasses import dataclass
from typing import Dict, List, Optional

import fbgemm_gpu.sparse_ops  # noqa: F401

import torch
from torchrec.datasets.criteo import DEFAULT_CAT_NAMES, DEFAULT_INT_NAMES
from torchrec.datasets.random import RandomRecDataset
from torchrec.datasets.utils import Batch
from torchrec.distributed.global_settings import set_propogate_device
from torchrec.fx.tracer import Tracer
from torchrec.inference.modules import (
    PredictFactory,
    PredictModule,
    quantize_inference_model,
    shard_quant_model,
)
from torchrec.models.dlrm import DLRM
from torchrec.modules.embedding_configs import EmbeddingBagConfig
from torchrec.modules.embedding_modules import EmbeddingBagCollection
from torchrec.sparse.jagged_tensor import KeyedJaggedTensor

import argparse
import sys
from typing import List

logger: logging.Logger = logging.getLogger(__name__)

def register_fake_classes() -> None:
    @torch._library.register_fake_class("fbgemm::AtomicCounter")
    class FakeAtomicCounter:
        def __init__(self, counter_):
            self.counter_ = counter_
        @classmethod
        def __obj_unflatten__(cls, flat_obj):
            return cls(**dict(flat_obj))
        def increment(self) -> int:
            self.counter_ += 1
            return self.counter_
        def decrement(self) -> int:
            self.counter_ -= 1
            return self.counter_
        def reset(self):
            self.counter_ = 0
        def get(self) -> int:
            return self.counter_
        def set(self, val):
            self.counter_ = val
    @torch._library.register_fake_class("fbgemm::TensorQueue")
    class FakeTensorQueue:
        def __init__(self, queue, init_tensor):
            self.queue = queue
            self.init_tensor = init_tensor
        @classmethod
        def __obj_unflatten__(cls, flattened_ctx):
            return cls(**dict(flattened_ctx))
        def push(self, x):
            self.queue.append(x)
        def pop(self):
            if len(self.queue) == 0:
                return self.init_tensor
            return self.queue.pop(0)
        def top(self):
            if len(self.queue) == 0:
                return self.init_tensor
            return self.queue[0]
        def size(self):
            return len(self.queue)



def create_training_batch(args) -> Batch:
    return RandomRecDataset(
        keys=DEFAULT_CAT_NAMES,
        batch_size=args.batch_size,
        hash_size=args.num_embedding_features,
        ids_per_feature=1,
        num_dense=len(DEFAULT_INT_NAMES),
    ).batch_generator._generate_batch()


def parse_args(argv: List[str]) -> argparse.Namespace:
    parser = argparse.ArgumentParser(description="torchrec dlrm model packager")
    parser.add_argument(
        "--num_embeddings",
        type=int,
        default=100_000,
        help="max_ind_size. The number of embeddings in each embedding table. Defaults"
        " to 100_000 if num_embeddings_per_feature is not supplied.",
    )
    parser.add_argument(
        "--num_embeddings_per_feature",
        type=str,
        default="45833188,36746,17245,7413,20243,3,7114,1441,62,29275261,1572176,345138,"
        "10,2209,11267,128,4,974,14,48937457,11316796,40094537,452104,12606,104,35",
        help="Comma separated max_ind_size per sparse feature. The number of embeddings"
        " in each embedding table. 26 values are expected for the Criteo dataset.",
    )
    parser.add_argument(
        "--sparse_feature_names",
        type=str,
        default=",".join(DEFAULT_CAT_NAMES),
        help="Comma separated names of the sparse features.",
    )
    parser.add_argument(
        "--dense_arch_layer_sizes",
        type=str,
        default="512,256,64",
        help="Comma separated layer sizes for dense arch.",
    )
    parser.add_argument(
        "--over_arch_layer_sizes",
        type=str,
        default="512,512,256,1",
        help="Comma separated layer sizes for over arch.",
    )
    parser.add_argument(
        "--embedding_dim",
        type=int,
        default=64,
        help="Size of each embedding.",
    )
    parser.add_argument(
        "--num_dense_features",
        type=int,
        default=len(DEFAULT_INT_NAMES),
        help="Number of dense features.",
    )
    parser.add_argument(
        "--output_path",
        type=str,
        help="Output path of model package.",
    )
    return parser.parse_args(argv)

@dataclass
class DLRMModelConfig:
    """
    Model Config for specifying DLRM model parameters.
    """

    dense_arch_layer_sizes: List[int]
    dense_in_features: int
    embedding_dim: int
    id_list_features_keys: List[str]
    num_embeddings_per_feature: List[int]
    num_embeddings: int
    over_arch_layer_sizes: List[int]
    sample_input: Batch


class DLRMPredictModule(PredictModule):
    """
    nn.Module to wrap DLRM model to use for inference.

    Args:
        embedding_bag_collection (EmbeddingBagCollection): collection of embedding bags
            used to define SparseArch.
        dense_in_features (int): the dimensionality of the dense input features.
        dense_arch_layer_sizes (List[int]): the layer sizes for the DenseArch.
        over_arch_layer_sizes (List[int]): the layer sizes for the OverArch. NOTE: The
            output dimension of the InteractionArch should not be manually specified
            here.
        id_list_features_keys (List[str]): the names of the sparse features. Used to
            construct a batch for inference.
        dense_device: (Optional[torch.device]).
    """

    def __init__(
        self,
        embedding_bag_collection: EmbeddingBagCollection,
        dense_in_features: int,
        dense_arch_layer_sizes: List[int],
        over_arch_layer_sizes: List[int],
        id_list_features_keys: List[str],
        dense_device: Optional[torch.device] = None,
    ) -> None:
        module = DLRM(
            embedding_bag_collection=embedding_bag_collection,
            dense_in_features=dense_in_features,
            dense_arch_layer_sizes=dense_arch_layer_sizes,
            over_arch_layer_sizes=over_arch_layer_sizes,
            dense_device=dense_device,
        )
        super().__init__(module, dense_device)

        self.id_list_features_keys: List[str] = id_list_features_keys

    def predict_forward(
        self, batch: Dict[str, torch.Tensor]
    ) -> Dict[str, torch.Tensor]:
        """
        Args:
            batch (Dict[str, torch.Tensor]): currently expects input dense features
                to be mapped to the key "float_features" and input sparse features
                to be mapped to the key "id_list_features".

        Returns:
            Dict[str, torch.Tensor]: output of inference.
        """

        try:
            logits = self.predict_module(
                batch["float_features"],
                KeyedJaggedTensor(
                    keys=self.id_list_features_keys,
                    lengths=batch["id_list_features.lengths"],
                    values=batch["id_list_features.values"],
                ),
            )
            predictions = logits.sigmoid()
        except Exception as e:
            logger.info(e)
            raise e

        # Flip predictions tensor to be 1D. TODO: Determine why prediction shape
        # can be 2D at times (likely due to input format?)
        predictions = predictions.reshape(
            [
                predictions.size()[0],
            ]
        )

        return {
            "default": predictions.to(torch.device("cpu"), non_blocking=True).float()
        }


class DLRMPredictFactory(PredictFactory):
    """
    Factory Class for generating TorchScript DLRM Model for C++ inference.

    Args:
        model_config (DLRMModelConfig): model config

    """

    def __init__(self, model_config: DLRMModelConfig) -> None:
        self.model_config = model_config

    def create_predict_module(self, world_size: int, device: str) -> torch.nn.Module:
        logging.basicConfig(level=logging.INFO)
        set_propogate_device(True)

        eb_configs = [
            EmbeddingBagConfig(
                name=f"t_{feature_name}",
                embedding_dim=self.model_config.embedding_dim,
                num_embeddings=(
                    self.model_config.num_embeddings_per_feature[feature_idx]
                    if self.model_config.num_embeddings is None
                    else self.model_config.num_embeddings
                ),
                feature_names=[feature_name],
            )
            for feature_idx, feature_name in enumerate(
                self.model_config.id_list_features_keys
            )
        ]
        ebc = EmbeddingBagCollection(tables=eb_configs, device=torch.device("meta"))

        module = DLRMPredictModule(
            embedding_bag_collection=ebc,
            dense_in_features=self.model_config.dense_in_features,
            dense_arch_layer_sizes=self.model_config.dense_arch_layer_sizes,
            over_arch_layer_sizes=self.model_config.over_arch_layer_sizes,
            id_list_features_keys=self.model_config.id_list_features_keys,
            dense_device=device,
        )

        quant_model = quantize_inference_model(module)
        sharded_model, _ = shard_quant_model(
            quant_model, compute_device=device, sharding_device=device
        )



        batch = {}
        batch["float_features"] = self.model_config.sample_input.dense_features.to(
            device
        )
        batch["id_list_features.lengths"] = (
            self.model_config.sample_input.sparse_features.lengths().to(device)
        )
        batch["id_list_features.values"] = (
            self.model_config.sample_input.sparse_features.values().to(device)
        )



        sharded_model(batch)

        aot_compile_options = {
            "aot_inductor.output_path": os.path.join(os.getcwd(), "dlrm_pt2.so"),
        }



        #with torch.no_grad():
        with torch.inference_mode():
            exported_program = torch.export.export(
                sharded_model,
                (batch,),
                strict=False,
            )
        so_path = torch._inductor.aot_compile(
        exported_program.module(),
        (batch,),
        # Specify the generated shared library path
        options=aot_compile_options
    )

    def batching_metadata(self) -> Dict[str, str]:
        return {
            "float_features": "dense",
            "id_list_features": "sparse",
        }

    def result_metadata(self) -> str:
        return "dict_of_tensor"

    def run_weights_independent_tranformations(
        self, predict_module: torch.nn.Module
    ) -> torch.nn.Module:
        return predict_module

    def run_weights_dependent_transformations(
        self, predict_module: torch.nn.Module
    ) -> torch.nn.Module:
        """
        Run transformations that depends on weights of the predict module. e.g. lowering to a backend.
        """
        return predict_module


def main(argv: List[str]) -> None:
    """
    Use torch.package to package the torchrec DLRM Model.

    Args:
        argv (List[str]): command line args.

    Returns:
        None.
    """

    args = parse_args(argv)

    args.batch_size = 10
    args.num_embedding_features = 26
    batch = create_training_batch(args)

    register_fake_classes()

    model_config = DLRMModelConfig(
        dense_arch_layer_sizes=list(map(int, args.dense_arch_layer_sizes.split(","))),
        dense_in_features=args.num_dense_features,
        embedding_dim=args.embedding_dim,
        id_list_features_keys=args.sparse_feature_names.split(","),
        num_embeddings_per_feature=list(
            map(int, args.num_embeddings_per_feature.split(","))
        ),
        num_embeddings=args.num_embeddings,
        over_arch_layer_sizes=list(map(int, args.over_arch_layer_sizes.split(","))),
        sample_input=batch,
    )

    DLRMPredictFactory(model_config).create_predict_module(world_size=1, device="cuda")



if __name__ == "__main__":
    main(sys.argv[1:])

```

## Error Logs

```
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _torchbind_obj0 target _torchbind_obj0 _torchbind_obj0 of  does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/export/_unlift.py:63: UserWarning: Attempted to insert a get_attr Node with no underlying reference in the owning GraphModule! Call GraphModule.add_submodule to add the necessary submodule, GraphModule.add_parameter to add the necessary Parameter, or nn.Module.register_buffer to add the necessary buffer
  getattr_node = gm.graph.get_attr(lifted_node)
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _module_sparse_arch_embedding_bag_collection_tbes_0_lxu_cache_locations_list target _module.sparse_arch.embedding_bag_collection.tbes.0.lxu_cache_locations_list lxu_cache_locations_list of _module.sparse_arch.embedding_bag_collection.tbes.0 does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _module_sparse_arch_embedding_bag_collection_tbes_0_weights_dev target _module.sparse_arch.embedding_bag_collection.tbes.0.weights_dev weights_dev of _module.sparse_arch.embedding_bag_collection.tbes.0 does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _module_sparse_arch_embedding_bag_collection_tbes_0_weights_uvm target _module.sparse_arch.embedding_bag_collection.tbes.0.weights_uvm weights_uvm of _module.sparse_arch.embedding_bag_collection.tbes.0 does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _module_sparse_arch_embedding_bag_collection_tbes_0_weights_placements target _module.sparse_arch.embedding_bag_collection.tbes.0.weights_placements weights_placements of _module.sparse_arch.embedding_bag_collection.tbes.0 does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _module_sparse_arch_embedding_bag_collection_tbes_0_weights_offsets target _module.sparse_arch.embedding_bag_collection.tbes.0.weights_offsets weights_offsets of _module.sparse_arch.embedding_bag_collection.tbes.0 does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _torchbind_obj0 target _torchbind_obj0 _torchbind_obj0 of  does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _torchbind_obj0 target _torchbind_obj0 _torchbind_obj0 of  does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _torchbind_obj0 target _torchbind_obj0 _torchbind_obj0 of  does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py:222: UserWarning: TensorFloat32 tensor cores for float32 matrix multiplication available but not enabled. Consider setting `torch.set_float32_matmul_precision('high')` for better performance.
  warnings.warn(
/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/graph.py:1794: UserWarning: Node _torchbind_obj0 target _torchbind_obj0 _torchbind_obj0 of  does not reference an nn.Module, nn.Parameter, or buffer, which is what 'get_attr' Nodes typically target
  warnings.warn(
Traceback (most recent call last):
  File "/home/agunapal/torchrec_aoti/dlrm_aoti_error.py", line 375, in <module>
    main(sys.argv[1:])
  File "/home/agunapal/torchrec_aoti/dlrm_aoti_error.py", line 370, in main
    DLRMPredictFactory(model_config).create_predict_module(world_size=1, device="cuda")
  File "/home/agunapal/torchrec_aoti/dlrm_aoti_error.py", line 308, in create_predict_module
    so_path = torch._inductor.aot_compile(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/__init__.py", line 211, in aot_compile
    return compile_fx_aot(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1246, in compile_fx_aot
    compiled_lib_path = compile_fx(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1427, in compile_fx
    return compile_fx(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1469, in compile_fx
    return compile_fx(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1700, in compile_fx
    return inference_compiler(unlifted_gm, example_inputs_)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1524, in fw_compiler_base
    return _fw_compiler_base(model, example_inputs, is_inference)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 1593, in _fw_compiler_base
    return inner_compile(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 587, in compile_fx_inner
    return wrap_compiler_debug(_compile_fx_inner, compiler_name="inductor")(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_dynamo/repro/after_aot.py", line 100, in debug_wrapper
    inner_compiled_fn = compiler_fn(gm, example_inputs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 754, in _compile_fx_inner
    compiled_graph = codegen_and_compile(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 651, in codegen_and_compile
    compiled_graph = fx_codegen_and_compile(gm, example_inputs, **fx_kwargs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/compile_fx.py", line 943, in fx_codegen_and_compile
    graph.run(*example_inputs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/graph.py", line 827, in run
    return super().run(*args)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/interpreter.py", line 167, in run
    self.env[node] = self.run_node(node)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/graph.py", line 1422, in run_node
    result = super().run_node(n)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/fx/interpreter.py", line 228, in run_node
    return getattr(self, n.op)(n.target, args, kwargs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/graph.py", line 1067, in call_function
    raise LoweringException(e, target, args, kwargs).with_traceback(
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/graph.py", line 1064, in call_function
    out = lowerings[target](*args, **kwargs)  # type: ignore[index]
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/lowering.py", line 401, in wrapped
    out = decomp_fn(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/lowering.py", line 6463, in with_effects
    result = ir.EffectfulKernel.create(op, *args, **kwargs)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/ir.py", line 6386, in create
    device = cls.find_device(tensor_args, example_output)
  File "/home/agunapal/anaconda3/envs/torchrec/lib/python3.10/site-packages/torch/_inductor/ir.py", line 6201, in find_device
    return devices[0]
torch._inductor.exc.LoweringException: IndexError: list index out of range
  target: with_effects
  args[0]: TensorBox(StorageBox(
    MultiOutput(
      python_kernel_name=None,
      name=buf1,
      layout=FixedLayout('cpu', torch.float32, size=[0], stride=[1]),
      inputs=[FallbackKernel(
        python_kernel_name='torch.ops.prims._make_token.default',
        name=buf0,
        layout=MultiOutputLayout(device=device(type='cpu')),
        inputs=[],
        constant_args=(),
        kwargs={},
        output_view=None,
        python_kernel_name=torch.ops.prims._make_token.default,
        cpp_kernel_name=prims::_make_token,
        ordered_kwargs_for_cpp_kernel=[],
        op_overload=prims._make_token.default,
        arg_properties=[],
        kwarg_properties=None,
        unbacked_bindings=None,
        mutation_outputs=[],
        origin_node=_make_token_default,
        origins=OrderedSet([_make_token_default])
      )],
      constant_args=(),
      kwargs={},
      output_view=None,
      python_kernel_name=None,
      cpp_kernel_name=None,
      ordered_kwargs_for_cpp_kernel=(),
      op_overload=None,
      arg_properties=[{}],
      kwarg_properties=None,
      unbacked_bindings={},
      mutation_outputs=[],
      origin_node=_make_token_default,
      origins=OrderedSet([_make_token_default])
    )
  ))
  args[1]: call_torchbind
  args[2]: TorchBindObject(name='_torchbind_obj0', value=<torch.ScriptObject object at 0x561e262c5410>)
  args[3]: pop

```


### Versions

```
Collecting environment information...
PyTorch version: 2.6.0.dev20241104+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: CentOS Stream 9 (x86_64)
GCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2)
Clang version: Could not collect
CMake version: version 3.30.5
Libc version: glibc-2.34

Python version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.12.0-0_fbk16_zion_7661_geb00762ce6d2-x86_64-with-glibc2.34
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA PG509-210
GPU 1: NVIDIA PG509-210
GPU 2: NVIDIA PG509-210
GPU 3: NVIDIA PG509-210
GPU 4: NVIDIA PG509-210
GPU 5: NVIDIA PG509-210
GPU 6: NVIDIA PG509-210
GPU 7: NVIDIA PG509-210

Nvidia driver version: 525.105.17
cuDNN version: Probably one of the following:
/usr/lib64/libcudnn.so.8.8.0
/usr/lib64/libcudnn.so.9.1.0
/usr/lib64/libcudnn_adv.so.9.1.0
/usr/lib64/libcudnn_adv_infer.so.8.8.0
/usr/lib64/libcudnn_adv_train.so.8.8.0
/usr/lib64/libcudnn_cnn.so.9.1.0
/usr/lib64/libcudnn_cnn_infer.so.8.8.0
/usr/lib64/libcudnn_cnn_train.so.8.8.0
/usr/lib64/libcudnn_engines_precompiled.so.9.1.0
/usr/lib64/libcudnn_engines_runtime_compiled.so.9.1.0
/usr/lib64/libcudnn_graph.so.9.1.0
/usr/lib64/libcudnn_heuristic.so.9.1.0
/usr/lib64/libcudnn_ops.so.9.1.0
/usr/lib64/libcudnn_ops_infer.so.8.8.0
/usr/lib64/libcudnn_ops_train.so.8.8.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          192
On-line CPU(s) list:             0-191
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8339HC CPU @ 1.80GHz
CPU family:                      6
Model:                           85
Thread(s) per core:              2
Core(s) per socket:              24
Socket(s):                       4
Stepping:                        11
Frequency boost:                 enabled
CPU(s) scaling MHz:              100%
CPU max MHz:                     1801.0000
CPU min MHz:                     800.0000
BogoMIPS:                        3600.00
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       3 MiB (96 instances)
L1i cache:                       3 MiB (96 instances)
L2 cache:                        96 MiB (96 instances)
L3 cache:                        132 MiB (4 instances)
NUMA node(s):                    4
NUMA node0 CPU(s):               0-23,96-119
NUMA node1 CPU(s):               24-47,120-143
NUMA node2 CPU(s):               48-71,144-167
NUMA node3 CPU(s):               72-95,168-191
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.1.3.1
[pip3] nvidia-cuda-cupti-cu12==12.1.105
[pip3] nvidia-cuda-nvrtc-cu12==12.1.105
[pip3] nvidia-cuda-runtime-cu12==12.1.105
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.0.2.54
[pip3] nvidia-curand-cu12==10.3.2.106
[pip3] nvidia-cusolver-cu12==11.4.5.107
[pip3] nvidia-cusparse-cu12==12.1.0.106
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.1.105
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] pytorch-triton==3.1.0+cf34004b8a
[pip3] torch==2.6.0.dev20241104+cu121
[pip3] torchmetrics==1.0.3
[pip3] torchrec==1.1.0a0+de7e041
[pip3] torchx==0.7.0
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
[conda] nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
[conda] nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
[conda] nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
[conda] nvidia-cudnn-cu12         9.1.0.70                 pypi_0    pypi
[conda] nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
[conda] nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
[conda] nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
[conda] nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi
[conda] nvidia-nvjitlink-cu12     12.1.105                 pypi_0    pypi
[conda] nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
[conda] pytorch-triton            3.1.0+cf34004b8a          pypi_0    pypi
[conda] torch                     2.6.0.dev20241104+cu121          pypi_0    pypi
[conda] torchmetrics              1.0.3                    pypi_0    pypi
[conda] torchrec                  1.1.0a0+de7e041           dev_0    <develop>
[conda] torchx                    0.7.0                    pypi_0    pypi
```

cc @ezyang @chauhang @penguinwu @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4 @desertfire @chenyang78