Skip to content

Commit 77f9d61

Browse files
authored
Fix parameter declarator cannot be qualified error (#361)
Before this change `include_guard` declaration can be interpreted as both local variable declaration and function prototype Disambiguate it by using curly bracket
1 parent 7dcf261 commit 77f9d61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functorch/csrc/BatchRulesDecompositions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void decompose_functional(const c10::OperatorHandle& op, torch::jit::Stack* stac
5353

5454
// Step 2: set up TLS such that we hit the functionalization kernels before the batching rules.
5555
// Note: this relies on the fact that Functionalization > BatchMode in DispatchKey.h
56-
c10::impl::IncludeDispatchKeyGuard include_guard(c10::DispatchKeySet(c10::DispatchKey::Functionalize));
56+
c10::impl::IncludeDispatchKeyGuard include_guard(c10::DispatchKeySet{c10::DispatchKey::Functionalize});
5757

5858
// Step 3: redispatch to native kernel
5959
// TODO: this is technically kind of sketchy, since we're relying on the fact

0 commit comments

Comments
 (0)