这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG] In cute/tensor_impl.hpp, delay creating new_layout to avoid unused-but-set-variable? #2487

@henrylhtsang

Description

@henrylhtsang

Which component has the problem?

CUTLASS C++

Bug Report

Describe the bug
We saw a build error because

include/cute/tensor_impl.hpp:765:6: error: variable ‘new_layout’ set but not used [-Werror=unused-but-set-variable]

pytorch/pytorch#158854
cc @Skylion007

I think it is because new_layout is not always used.

auto new_layout = recast_layout<OldType,NewType>(old_layout);
if constexpr (is_same<NewType, OldType>::value) {
return tensor;

Can this be fixed?

Steps/Code to reproduce bug
See PyTorch PR linked.

Expected behavior
Build should be successful even with -Werror=unused-but-set-variable

Environment details (please complete the following information):

  • Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions