Fix portable kernel utils for aten mode (#1563)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/1563 In supporting build for aten mode, reduce_util has dependency on index_util.cpp. Reduce util depends on index_util for a util function, check_index_out_args However this function is used only when not being built for aten mode. When being built with aten mode, index_util.cpp ends up including c10/ScalarType.h (via scalar_type_utils.h). Both c10/ScalartType.h and scalar_type_utils.h define toString which results in compiler error. We should really fix scalar_type_utils.h to allow for aten mode build, but that needs more work. In the mean time check_index_out_args is used only in reduce_util.cpp so there is no need to really factor out index_util.cpp, so removin this refactor. ghstack-source-id: 211679772 exported-using-ghexport Reviewed By: larryliu0820, GregoryComer Differential Revision: D52626505 fbshipit-source-id: 57d4fdda77117347813738d86d611f8c17d5e660
K
Kimish Patel committed
10ef41e2a13b8ed8bc2ce0ad29407d278a2bcfb4
Parent: 845ce38
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 1/9/2024, 10:56:00 PM