-
Notifications
You must be signed in to change notification settings - Fork 77
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
Using go to implement parameter server side optimization #265
Comments
Here are some initial thoughts:
For 2, The current implementation is we have optimizer in C++, I think it's will be quite simple to compile the C++ operator implementation into optimizer. If we want to directly call Eigen from Go (frequently), we need to be careful of the cgo cost: https://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/ Will take more look tomorrow and discuss in tomorrow night US time. |
It seems that https://golang.org/pkg/reflect/#MakeFunc is able to make multi-typed tensor operations. Edit: Seems |
No. We must re-implement optimizers as "Ops" for more complexity. |
最近尝试写了几种方式 port eigen:
关于cgo的性能: |
都非常好奇如何实现的,能否贴一下示例代码?(感觉可以成为https://github.com/PaddlePaddle/blog/issues/1 中的一个亮点)
我觉得取决于什么样的计算库,Eigen这种底层的计算库可能会非常频繁。如果是一个layer(甚至一个Op)用C++实现,Go调用,可能cgo overhead跟计算所花时间对比,可以忽略不计? |
嗯嗯,这个实现了一半,后续我可以完善一个demo case贴在blog中。
嗯如果Op或Layer使用C++实现,实际大部分的code还是在C++端,这个方式和Tensorflow类似,只是用go来描述网络的配置了。 |
There are two ways to accomplish this:
The text was updated successfully, but these errors were encountered: