Skip to content

Commit

Permalink
[compiled_autograd] Rename interface to pyinterface (pytorch#145495)
Browse files Browse the repository at this point in the history
Summary: interface is a reserved word in some MSVC variants.

Test Plan: build

Differential Revision: D68561379

Pull Request resolved: pytorch#145495
Approved by: https://github.com/xmfan
  • Loading branch information
zou3519 authored and pytorchmergebot committed Jan 23, 2025
1 parent 302b07f commit e1407f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torch/csrc/autograd/custom_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ struct CppNode : public Node {
IValuePacker<std::vector<std::optional<InputMetadata>>>::pack(
torch::dynamo::autograd::get_input_metadata(next_edges()));

const auto& interface = torch::dynamo::autograd::getPyCompilerInterface();
const auto& pyinterface = torch::dynamo::autograd::getPyCompilerInterface();

// Each time apply_with_saved is called, we bind a new function to Python.
// This is because the schema might be different on compiled autograd cache
Expand All @@ -368,14 +368,14 @@ struct CppNode : public Node {
schema.emplace_back(ivalue.type());
}
}
auto fn_name = interface->bind_function(
auto fn_name = pyinterface->bind_function(
saved.get_py_compiler(),
std::string(typeid(T).name()),
CppNode_apply_functional_ivalue<T>,
schema,
/*is_custom_function*/ true);

auto results = interface->call_function(
auto results = pyinterface->call_function(
saved.get_py_compiler(),
"apply_functional",
fn_name,
Expand Down

0 comments on commit e1407f5

Please sign in to comment.