Skip to content

Commit

Permalink
赛题八:paddleviz能力扩展- 暴露给python端反向节点命名优化 (PaddlePaddle#57626)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuwenbogdut authored and Frida-a committed Oct 14, 2023
1 parent b5cd5ef commit 8694cfb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion paddle/fluid/eager/grad_node_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ std::vector<std::shared_ptr<GradNodeBase>> GradNodeBase::NextFunctions() {
return next_nodes;
}

uintptr_t GradNodeBase::GetThisPtr() const {
uintptr_t GradNodeBase::GetPtr() const {
return reinterpret_cast<uintptr_t>(this);
}

Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/eager/grad_node_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class GradNodeBase {

std::vector<std::shared_ptr<egr::GradNodeBase>> NextFunctions();

uintptr_t GetThisPtr() const;
uintptr_t GetPtr() const;

/**
* Apply GradientHook
Expand Down
3 changes: 1 addition & 2 deletions paddle/fluid/pybind/pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,7 @@ PYBIND11_MODULE(libpaddle, m) {
[](const std::shared_ptr<egr::GradNodeBase> &self) {
return self->NextFunctions();
})

.def("node_this_ptr", &egr::GradNodeBase::GetThisPtr)
.def("node_ptr", &egr::GradNodeBase::GetPtr)
.def("input_meta",
[](const std::shared_ptr<egr::GradNodeBase> &self) {
return self->InputMeta();
Expand Down

0 comments on commit 8694cfb

Please sign in to comment.