Skip to content

[Bug][Operator] fill_scalar_ 不符合预期的调用 #712

Description

@zhzhcookie

Describe the bug

在 with flag_gems 中把一个单值 tensor 打印一下值

            logger.debug("before reshape: out={}={}".format(out, out.shape))
            out = torch.reshape(out, [1, 1])
            logger.debug("after reshape: out={}={}".format(out, out.shape))

打印结果是

before reshape: out=1.84778892993927=torch.Size([])
after reshape: out=tensor([[1.8478]], device='cuda:0')=torch.Size([1, 1])

reshape前的打印很正常,没有多余的日志。
reshape之后的打印会导致额外打印 9255次 DEBUG root:fill.py:63 GEMS FILL_SCALAR_
可能需要排查一下调用链,是 pytorch 本来就有这么多次 kernel 的调用,还是说注册得不合理,其实kernel无需执行这么多次。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions