-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"fix unsigned compare problem" #5359
"fix unsigned compare problem" #5359
Conversation
paddle/optimizer/CMakeLists.txt
Outdated
add_simple_unittest(serialization_test) | ||
add_simple_unittest(parameter_optimizer_test) | ||
endif() | ||
cc_library(paddle_optimizer SRCS ${OPITMIZER_SRCS} DEPS paddle_proto gtest glog) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity complains
[14:33:58] CMake Error at cmake/generic.cmake:189 (add_dependencies):
[14:33:58] The dependency target "gtest" of target "paddle_optimizer" does not exist.
[14:33:58] Call Stack (most recent call first):
[14:33:58] paddle/optimizer/CMakeLists.txt:10 (cc_library)
It seems that paddle_optimizer
doesn't depend on gtest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. Thanks!
@@ -9,11 +7,6 @@ set(OPITMIZER_SRCS | |||
sgd_optimizer.cc | |||
) | |||
|
|||
add_library(paddle_optimizer STATIC ${OPITMIZER_SRCS}) | |||
add_dependencies(paddle_optimizer paddle_proto ${external_project_dependencies}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity fails at
[15:45:21] # github.com/PaddlePaddle/Paddle/go/pserver
[15:45:21] /tmp/go-build227723758/github.com/PaddlePaddle/Paddle/go/pserver/_obj/optimizer.cgo2.o: In function `_cgo_eff63c273c7c_Cfunc_paddle_create_optimizer':
[15:45:21] pserver/cgo-gcc-prolog:79: undefined reference to `paddle_create_optimizer'
[15:45:21] /tmp/go-build227723758/github.com/PaddlePaddle/Paddle/go/pserver/_obj/optimizer.cgo2.o: In function `_cgo_eff63c273c7c_Cfunc_paddle_optimizer_get_state':
[15:45:21] pserver/cgo-gcc-prolog:98: undefined reference to `paddle_optimizer_get_state'
[15:45:21] /tmp/go-build227723758/github.com/PaddlePaddle/Paddle/go/pserver/_obj/optimizer.cgo2.o: In function `_cgo_eff63c273c7c_Cfunc_paddle_optimizer_get_weights':
[15:45:21] pserver/cgo-gcc-prolog:117: undefined reference to `paddle_optimizer_get_weights'
[15:45:21] /tmp/go-build227723758/github.com/PaddlePaddle/Paddle/go/pserver/_obj/optimizer.cgo2.o: In function `_cgo_eff63c273c7c_Cfunc_paddle_release_optimizer':
[15:45:21] pserver/cgo-gcc-prolog:135: undefined reference to `paddle_release_optimizer'
[15:45:21] /tmp/go-build227723758/github.com/PaddlePaddle/Paddle/go/pserver/_obj/optimizer.cgo2.o: In function `_cgo_eff63c273c7c_Cfunc_paddle_update_parameter':
[15:45:21] pserver/cgo-gcc-prolog:158: undefined reference to `paddle_update_parameter'
[15:45:21] collect2: error: ld returned 1 exit status
[15:45:21] make[2]: *** [go/cmd/pserver/pserver_timestamp] Error 2
[15:45:21] go/cmd/pserver/CMakeFiles/pserver.dir/build.make:61: recipe for target 'go/cmd/pserver/pserver_timestamp' failed
[15:45:21] make[1]: *** [go/cmd/pserver/CMakeFiles/pserver.dir/all] Error 2
[15:45:21] make[1]: *** Waiting for unfinished jobs....
It could be that we cannot delete the line
add_dependencies(paddle_optimizer paddle_proto ${external_project_dependencies})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that above is not the reason -- even if I add that line back, it still fails.
I noticed that CMake does no longer think that the target paddle_go_optimizer
depends on paddle_optimizer
. The GraphViz file generated by CMake includes the follows lines that refer to paddle_go_optimizer
:
"node62" [ label="paddle_go_optimizer" shape="diamond"];
"node62" -> "node468" // paddle_go_optimizer -> glog
"node62" -> "node469" // paddle_go_optimizer -> gflags
"node62" -> "node471" // paddle_go_optimizer -> -lpthread
"node62" -> "node31" // paddle_go_optimizer -> paddle_proto
"node62" -> "node473" // paddle_go_optimizer -> mklml
"node62" -> "node474" // paddle_go_optimizer -> zlib
"node62" -> "node472" // paddle_go_optimizer -> protobuf
"node62" -> "node475" // paddle_go_optimizer -> mkldnn
"node62" -> "node476" // paddle_go_optimizer -> warpctc
"node477" [ label="stdc++" shape="ellipse"];
"node62" -> "node477" // paddle_go_optimizer -> stdc++
"node478" [ label="m" shape="ellipse"];
"node62" -> "node478" // paddle_go_optimizer -> m
where paddle_optimizer
doesn't appear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I add a namespace to these C interfaces, so the paddle_optimizer_get_weights
goes to paddle::optimizer::paddle_optimizer_get_weights
, then it failed.
The dependency graph is quite strange, I have tried the develop branch, which also lacks the link between paddle_go_optimizer
and paddle_optimizer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes #5340