Uh oh!
There was an error while loading. Please reload this page.
[Relay][Memory][VM] - #3560
Conversation
ajtulloch
commented
Jul 19, 2019
@jroesch what kind of optimizations will this enable? |
@ajtulloch This PR models memory allocation/deallocation explicitly in relay expression, it will open the opportunity to write passes to analyze memory operation and try allocation coalescing etc. It will also simplify vm bytecode generation. |
icemelon
commented
Aug 3, 2019
Any updates? @jroesch |
zhiics
left a comment
There was a problem hiding this comment.
@jroesch I just started the review and had a quick glance on it. I will do a more careful review by this week. Jared, could you please provide a little more description for this PR, i.e. the mechanism of the memory optimization and why we introduce these annotations. That would help the review as well. Thank you.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
zhiics
left a comment
There was a problem hiding this comment.
It looks good. I have a few questions:
- How is live memory released/killed currently?
- Can we reuse the allocated memory as the current memory planning pass does? Or we just get memory from the pool directly?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bf9555a to
2806a08CompareUh oh!
There was an error while loading. Please reload this page.
6a43034 to
d7fefb9Compare
zhiics
left a comment
There was a problem hiding this comment.
I am half way done. I will spend more time tomorrow to look at the design.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
icemelon
left a comment
There was a problem hiding this comment.
half-way through. will continue after the flight
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
zhiics
commented
Oct 27, 2019
@jroesch I checked out the PR and debugged it. The compilation error is caused by converting tensors from |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1df4d3d to
c4eb59fCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| explicit TypeName( \ | ||
| ::tvm::runtime::ObjectPtr<::tvm::runtime::Object> n) \ | ||
| : ParentType(n) {} \ | ||
| ObjectName* operator->() { \ |
There was a problem hiding this comment.
The mutational def was a bit dangerous, can we explicitly use the define_ref_methods and add the mutationable ref methods directly? This will also reduce one macro
There was a problem hiding this comment.
You can not do that as the definitions are incompatible overloads
There was a problem hiding this comment.
they are compatible, because operator->() and operator->()const are two different functions
There was a problem hiding this comment.
I got an error about return type overload not working when I tried to do it.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Manifest memory allocations Fix Windows fixes Clean up Storage memory manager Address final review Fix lint Wei's comments Disable dynamic input for now
Explicitly manifest memory and tensor allocations in Relay. This is to enable future optimizations and transformations.
I have an initial version of the PR nearly ready for review. The general goal of this PR is to perform all calling convention regularization which has historically been done in the runtime in the . IR instead, so we can further optimize. The final remaining piece is the transform of dynamic shape handling code into the IR as well.