Skip to content

Commit 17ee5de

Browse files
malfetpytorchmergebot
authored andcommitted
Mark underlying type as C10_UNUSED (pytorch#80415)
Fixes regression detected in pytorch#79978 As result some of the internal workflows fail as follows: ``` aten/src/ATen/native/cpu/CopyKernel.cpp:28:5: error: unused type alias 'underlying_t' [-Werror,-Wunused-local-typedef] AT_DISPATCH_QINT_TYPES(dtype, "copy_kernel", [&] { ^ src/ATen/native/cpu/CopyKernel.cpp:28:5: error: unused type alias 'underlying_t' [-Werror,-Wunused-local-typedef] aten/src/ATen/Dispatch.h:393:34: note: expanded from macro 'AT_DISPATCH_QINT_TYPES' AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_QINT_TYPES(__VA_ARGS__)) ``` Pull Request resolved: pytorch#80415 Approved by: https://github.com/atalman, https://github.com/peterbell10
1 parent d4f8a6d commit 17ee5de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aten/src/ATen/Dispatch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TORCH_API void record_kernel_function_dtype(std::string name);
9595
case enum_type: { \
9696
AT_PRIVATE_CHECK_SELECTIVE_BUILD(enum_type); \
9797
using scalar_t = scalar_type; \
98-
using underlying_t = typename scalar_t::underlying; \
98+
using underlying_t C10_UNUSED = typename scalar_t::underlying; \
9999
const auto& SCALAR_TYPE C10_UNUSED_DISPATCH_CUDA_WORKAROUND = enum_type; \
100100
const auto& UNDERLYING_TYPE C10_UNUSED_DISPATCH_CUDA_WORKAROUND = \
101101
toUnderlying(enum_type); \

0 commit comments

Comments
 (0)