Skip to content

Internal assert for pad: Failed to concretize an output IterType for expression #798

@IvanYashchuk

Description

@IvanYashchuk

To reproduce:

import torch
from nvfuser import FusionDefinition, DataType

def nvfuser_fusion_id0(fd : FusionDefinition) -> None :
    T0 = fd.define_tensor(shape=[1, -1], contiguity=[None, True], dtype=DataType.Int, is_cpu=False)
    S1 = fd.define_scalar(None, dtype=DataType.Int)
    T8 = fd.ops.pad(T0, [0, 0, 0, 0], S1)
    fd.add_output(T8)

with FusionDefinition() as fd:
    nvfuser_fusion_id0(fd)

inputs = [
    torch.randint(0, 10, (1, 3), dtype=torch.int64, device='cuda:0').as_strided((1, 3), (3, 1)),
    -5,
]
fd.execute(inputs)
File ~/dev/pytorch/master/nvfuser/__init__.py:122, in FusionDefinition.execute(self, inputs, device, override_user_schedule, capture_debug_output)
    120 result = None
    121 try:
--> 122     result = self._execute(
    123         inputs,
    124         override_user_schedule,
    125         device=device,
    126         capture_debug_output=capture_debug_output,
    127     )
    128 except Exception as err:
    129     msg = (
    130         f"An error occurred while executing nvFuser FusionDefinition {self.id()}.\n"
    131         "If you believe this is a bug or need assistance, please file an issue at "
    132         "https://github.com/NVIDIA/Fuser/issues/new\n"
    133     )

RuntimeError: iter_type != IterType::Symbolic INTERNAL ASSERT FAILED at "/home/iyashchuk/dev/nvfuser/csrc/dynamic_transform.cpp":634, please report a bug to PyTorch. Failed to concretize an output IterType for expression: Resize: bS2{1}rf by ( (nvfuser_index_t)(0) ) and ( (nvfuser_index_t)(0) ) -> bS3{( ( ( (nvfuser_index_t)(0) ) + 1 ) + ( (nvfuser_index_t)(0) ) )}rf

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions