-
Notifications
You must be signed in to change notification settings - Fork 8
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
Type conversion interface #4
Comments
current interface is |
I used to use It might be nice to re-use Flux's |
@MikeInnes Unfortunately, we can not import Flux into our project for using the Also, what are the |
I personally prefer Regarding to treelike, we already have one (tho, it's a bit ugly at the moment), it provides the traversing functionality and printing etc. I think we should bring that abstract tree package back to life, so we could merge those effort on this. we will consider to integrate with Flux's AD or Zygote in another package which provides AD for quantum circuits. But Yao will be something like DE.jl, a meta package. |
Sure, I'm not expecting you to take a Flux dependency. Splitting out the The reason for |
@MikeInnes What about AbstractTree.jl, I copied part of it while implementing our printings. Is there any reason Flux is not using this? Maybe we should just have some functions instead of providing any type for them. |
For Flux's purposes at least, we don't really need AbstractTrees' functionality. We really just need |
@MikeInnes I see. I guess you only need that for the conversion between CPU and GPU in Flux. We do need some traverse API to dispatch/collect parameters however, unlike normal machine learning models we need to dispatch parameter across the whole tree. The block tree in Yao is actually a kind of AST in some sense, so it requires more functionality of a tree-like data structure. |
Maybe we should avoid using
In fact, I am pretty happy with current recursive approach to visit all nodes 😂 . What can we expect from the |
@MikeInnes I'd love to have @GiggleLiu No, I mean it requires more functionality of a tree-like data structure than Flux's For conversion between CPU and GPU in Yao, I think we can just use our own tree operators for now. |
This package should provide a
gpu
function that do the following, like FluxML/Flux.jl#513The text was updated successfully, but these errors were encountered: