-
Notifications
You must be signed in to change notification settings - Fork 951
Remove kernel_registry and call backends directly. #683
Conversation
Awesome work, glad you're killing the tape types :) Only major comment is in tensor.ts Reviewed 49 of 79 files at r3. src/engine.ts, line 37 at r3 (raw file):
it'd be nice to document "save" somewhere, maybe here. Just say that these are tensors computed in the forward pass that we need in the backwards pass. src/tape.ts, line 121 at r3 (raw file):
you can consolidate this block to:
and completely remove "prunedOutputs" src/tensor.ts, line 598 at r3 (raw file):
this change seems a little weird to me - why are the chained ops now taking this as the first argument, and why not all of them? Comments from Reviewable |
Review status: 49 of 58 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. src/engine.ts, line 102 at r3 (raw file):
this is kind of funny, won't the active scope name be the operation name because of @operation and the scope around the operation, and not the actual kernelName? Comments from Reviewable |
Review status: 49 of 58 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. src/engine.ts, line 102 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
One idea is to keep passing a string for the kernel name just for logging. Comments from Reviewable |
Review status: 48 of 58 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. src/engine.ts, line 37 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Done. src/engine.ts, line 102 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Great observation. So I was thinking about this a little. There will be a skew between kernels and user-ops and I think for now, before we have aggregation done, it's better to report user-ops since that is what the user controls (we report the inner-most named scope, with ability to aggregate). Couple reasons for this argument:
Once we have aggregation done, we can come back and decide maybe to report both kernel and op, at which point, we can add a required WDYT? src/tape.ts, line 121 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Done. src/tensor.ts, line 598 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Comments from Reviewable |
Review status: 46 of 58 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. src/engine.ts, line 102 at r3 (raw file): Previously, dsmilkov (Daniel Smilkov) wrote…
That sounds reasonable to me. Maybe let's name this field to that effect: s/kernelName/scopeName or something. Comments from Reviewable |
Review status: 46 of 58 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. src/engine.ts, line 102 at r3 (raw file): Previously, nsthorat (Nikhil Thorat) wrote…
Done. Comments from Reviewable |
dy
and thesaved
tensors to the backprop function.tape_types.ts
andtape_util.ts
into a single filetape.ts
activeScope
, which should point to the last operation which called the kernel. The aggregation of these and showing hierarchical debug view is still a TODO.This change is