mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[NOOP][clangformat][codemod] Enable CLANGFORMAT (#67854)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67854 Test Plan: Visual inspection. Sandcastle. Reviewed By: zertosh Differential Revision: D32173077 fbshipit-source-id: 10ab4b0afa18c7be4fab3e3564d9b479a7a48cb5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
938bab0bfd
commit
e8ac8c005d
@ -440,18 +440,22 @@ c10::IValue make_custom_class(CtorArgs&&... args) {
|
||||
return c10::IValue(std::move(userClassInstance));
|
||||
}
|
||||
|
||||
|
||||
// Alternative api for creating a torchbind class over torch::class_ this api is preffered to prevent size regressions
|
||||
// on Edge usecases. Must be used in conjunction with TORCH_SELECTIVE_CLASS macro aka
|
||||
// Alternative api for creating a torchbind class over torch::class_ this api is
|
||||
// preffered to prevent size regressions on Edge usecases. Must be used in
|
||||
// conjunction with TORCH_SELECTIVE_CLASS macro aka
|
||||
// selective_class<foo>("foo_namespace", TORCH_SELECTIVE_CLASS("foo"))
|
||||
template <class CurClass>
|
||||
inline class_<CurClass> selective_class_(const std::string& namespace_name, detail::SelectiveStr<true> className) {
|
||||
auto class_name = std::string(className.operator const char *());
|
||||
inline class_<CurClass> selective_class_(
|
||||
const std::string& namespace_name,
|
||||
detail::SelectiveStr<true> className) {
|
||||
auto class_name = std::string(className.operator const char*());
|
||||
return torch::class_<CurClass>(namespace_name, class_name);
|
||||
}
|
||||
|
||||
template <class CurClass>
|
||||
inline detail::ClassNotSelected selective_class_(const std::string&, detail::SelectiveStr<false>) {
|
||||
inline detail::ClassNotSelected selective_class_(
|
||||
const std::string&,
|
||||
detail::SelectiveStr<false>) {
|
||||
return detail::ClassNotSelected();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user