    def gen_stride_str(self, dim: int, dim_names: List[str]) -> str:
        """
        Returns the str to calculate the stride of a certain dim. This is
        a temporary solution to get around dynamic shapes problems with
        tensor_accessor. dim_names is a list of str, such as ["B", "M", "K"]
        for the first input to bmm_rcr.

        Note that both dim and dim_names are based on self.original_shapes.

        Throws RuntimeError if such a stride number cannot be computed.
        """
        strides = self.try_get_stride_strs(dim, dim_names)
        if strides is None:
            raise RuntimeError("Failed to get stride strs!")
        return " * ".join(strides)
Returns the str to calculate the stride of a certain dim. This is
a temporary solution to get around dynamic shapes problems with
tensor_accessor. dim_names is a list of str, such as ["B", "M", "K"]
for the first input to bmm_rcr.

Note that both dim and dim_names are based on self.original_shapes.

Throws RuntimeError if such a stride number cannot be computed.
python/aitemplate/compiler/tensor_accessor.py