Skip to content

error: a member of type "const c10::Symbol" cannot have an in-class initializer on Windows #48835

@datumbox

Description

@datumbox

🐛 Bug

PR #48717 replaced constexpr with CONSTEXPR_EXCEPT_WIN_CUDA to resolve some of the problems on CUDA+Windows for TorchVision as discussed at pytorch/vision#3051. Unfortunately we continue having issues:

C:/Users/circleci/project/env/lib/site-packages/torch/include\torch/csrc/jit/ir/ir.h(1329): error: a member of type "const c10::Symbol" cannot have an in-class initializer

C:/Users/circleci/project/env/lib/site-packages/torch/include\torch/csrc/jit/ir/ir.h(1349): error: a member of type "const c10::Symbol" cannot have an in-class initializer

I believe we need to move the initialization outside of the class on the following two places:

static CONSTEXPR_EXCEPT_WIN_CUDA Symbol Kind = ::c10::prim::profile;

static CONSTEXPR_EXCEPT_WIN_CUDA Symbol Kind = ::c10::prim::profile_optional;

cc @malfet @seemethere @walterddr @peterjc123 @maxluk @nbcsm @guyang3532 @gunandrose4u @mszhanyi @skyline75489 @ezyang

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: buildBuild system issuesmodule: windowsWindows support for PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions