-
Notifications
You must be signed in to change notification settings - Fork 15
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
[DoNotMerge] Implement withBackend
.
#25
base: master
Are you sure you want to change the base?
Conversation
Clarify comment, use `BackendGPU` for correctness.
is this branch still DoNotMerge? |
Yes, I haven't solved the type erasure bug yet. The problem is I can't check whether a generic type parameter |
I am not sure I understand the design of the To solve that problem don't use Rep[Unit] but Unit instead, this is the same thing. |
I originally tried comparing with |
Let's not spend cycles on this right now. Plenty of priority things to do. |
Let's drop this for now. We should try to get small CNN case running on GPU ASAP |
The design of
withBackend
is explained here.Non-nested invocations
withBackend
should work as expected. (Testmatrix-matrix-dot-with-backend
added in this PR is verified to work on GPU.) Nested invocations ofwithBackend
should also work, but have not yet been tested.Please do not merge until these type erasure
FIXME
s is fixed:I tried to use
TypeTag
but it didn't work:I encounter the same problem if I try to use
Manifest
:One idea is to define extra overloads for
withBackend
, but this doesn't work because it leads to ambiguity errors:Does anyone have ideas for working around type erasure? @GSAir