Skip to content

Commit a894fff

Browse files
ezyangfacebook-github-bot
authored andcommittedApr 22, 2020
Back out "Revert D21089648: Put TORCH_LIBRARY in torch/library.h; add custom class API"
Summary: Original commit changeset: 636e8a11afc6 Test Plan: export to OSS Reviewed By: malfet Differential Revision: D21170502 fbshipit-source-id: e8f35f103c4924aedbcaaf868475008d24bdeeab
1 parent 3b832ee commit a894fff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+804
-782
lines changed
 

‎aten/src/ATen/autocast_mode.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <ATen/ATen.h>
2-
#include <ATen/core/op_registration/op_registration.h>
2+
#include <torch/library.h>
33
#include <ATen/NativeFunctions.h>
44
#include <ATen/autocast_mode.h>
55

@@ -373,7 +373,7 @@ Therefore, for the moment, this is all copy pasted in from VariableTypeEverythin
373373
Explicit registration for out-of-place ops
374374
*****************************************/
375375
TORCH_LIBRARY_IMPL(_, Autocast, m) {
376-
m.fallback(c10::CppFunction::makeFallthrough());
376+
m.fallback(torch::CppFunction::makeFallthrough());
377377
}
378378

379379
TORCH_LIBRARY_IMPL(aten, Autocast, m) {
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#include <ATen/core/op_registration/op_registration.h>
2-
3-
namespace {
1+
#include <torch/library.h>
42

53
TORCH_LIBRARY_IMPL(_, BackendSelect, m) {
6-
m.fallback(c10::CppFunction::makeFallthrough());
7-
}
8-
4+
m.fallback(torch::CppFunction::makeFallthrough());
95
}

0 commit comments

Comments
 (0)
Please sign in to comment.