Skip to content

[TIR][USMP] Added buffer info extraction pass - #8468

Merged
areusch merged 8 commits into
apache:mainfrom
manupak:usmp_extract_buffer_info
Nov 23, 2021
Merged

[TIR][USMP] Added buffer info extraction pass#8468
areusch merged 8 commits into
apache:mainfrom
manupak:usmp_extract_buffer_info

Conversation

@manupak

@manupakmanupak commented Jul 14, 2021

Copy link
Copy Markdown
Contributor

This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.

  • Added test for a linear model
  • Added test for parallel/serial mixed for loops
  • Added test for a substructure of inception-style model.
  • Exposed buffer_info creation to python
  • Added member functions to update pool info
  • Unit tests to cover functionality of buffer_info

There is a subsequent PR depends on this : manupak#1

@manupak

Copy link
Copy Markdown
ContributorAuthor

I think this could be reviewed now. @areusch@jroesch@jcf94

@junrushao

junrushao commented Aug 11, 2021

Copy link
Copy Markdown
Member

Hey @manupa-arm, thanks for the nice PR!

As a main thing I am a little bit worried about, I would love to discuss specifically on the IR-related change, because in the worse case, adding/changing/removing an IR node would result in malfunctioning of many passes. Therefore, we tend to keep the IR stable if possible, and scrutinize any changes to the IR. For example, when @masahi was adding the while node (really awesome work #7425), we discussed very carefully on the implication, and actually updated many passes that are affected by that particular change.

As we are adopting the new RFC process, I would love to propose that if the RFC implies any IR modification, the modification should be written explicitly in a section (e.g. which fields are added), and be discussed really carefully on potential alternatives without IR change, and everything that could happen if the IR is changed (e.g. which passes won't work). CC: @jroesch@vinx13@areusch@comaniac

On this particular case, we are seeing a set of IR changes, including this PR, the PrimFunc PR, the allocate_const PR. That will be super helpful if you guys could send a RFC discussing the rationale and potential implication on this set of changes to TIR, so that it could be more more maintainable in the foreseeable future.

🙏 Many thanks!

@manupak

Copy link
Copy Markdown
ContributorAuthor

Hi @junrushao1994 ,

Yes, we are working on writing up the allocate_const RFC and hoping to post it soon. For this one's addition of pinned_memory attribute to allocate, happy to write up a RFC but I feel there is an alternative w/o changing the IR if thats preferred using AttrStmt -- let me know what you think.

@tqchen

tqchen commented Aug 11, 2021

Copy link
Copy Markdown
Member

Thanks @manupa-arm . I believe @junrushao1994 's comment was mainly about the process.

It would be great if we can separate the IR node change RFC/PRs from the feature RFC(USMP). since IR changes would involve more deliberation, and explicitly marking the RFC about the IR node change would help to get the folks involved in these parts without necessarily going to deep into the feature RFC.

Back to the pinned memory itself, we might be able to fold some of that info into the PointerType storage_scope field as what @masahi did in some of his recent refactor

@areuschareusch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manupa-arm i didn't have time to do a full review but here's some early feedback

Comment threadinclude/tvm/tir/stmt.h Outdated
Comment threadinclude/tvm/tir/usmp/analysis.h Outdated
Comment threadinclude/tvm/tir/usmp/utils.h
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
// We only statically memory plan only allocates with known
// compile time sizes.
auto buffer_info = BufferInfo(op->buffer_var->name_hint, size_bytes);
buffer_info->SetPoolCandidates(ParseCommaSeperatedString(op->pinned_memory));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if pinned_memory is empty?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explained more and inserted checks

Comment threadinclude/tvm/tir/usmp/utils.h Outdated
@areusch

Copy link
Copy Markdown
Contributor

i think the current status of this PR is that it's blocked on apache/tvm-rfcs#22 . @manupa-arm do you agree?

@manupak

Copy link
Copy Markdown
ContributorAuthor

I think this is blocked on me doing RFC text changes in apache/tvm-rfcs#23 and reflecting that to USMP RFC.

This one does not consider tir.allocate_const / tir.constants just yet; We are planning to add that in a seperate PR once apache/tvm-rfcs#22 is resolved and #8509 is landed.

Sorry, I ll spend the next cycles on apache/tvm-rfcs#23 --> USMP RFC --> this one after landing this : #8795 which keeps getting conflicted

@manupak
manupakforce-pushed the usmp_extract_buffer_info branch from bf17872 to f006178CompareOctober 5, 2021 11:06
@manupak
manupak requested a review from Hzfengsy as a code ownerOctober 5, 2021 11:06
@manupak
manupak marked this pull request as draft October 5, 2021 11:06
@manupak

Copy link
Copy Markdown
ContributorAuthor

This has been updated to reflect the changes as per the discussion on the RFCs.
However, currently it depends on the PR : #9168 , therefore putting this to draft until that is merged.

@manupak
manupakforce-pushed the usmp_extract_buffer_info branch 2 times, most recently from 03d1ba0 to 8294bcfCompareOctober 6, 2021 18:01
@manupak
manupakforce-pushed the usmp_extract_buffer_info branch from 8294bcf to 1954bdeCompareOctober 7, 2021 15:23

@manupakmanupak left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@areusch addressed the comments! :)

Comment threadinclude/tvm/tir/usmp/utils.h

@areuschareusch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manupa-arm thanks, had a look over this. i think it's mostly straightforward and am mainly requesting some more comments for those less familiar.

cc @mbs-octoml@electriclilies@mikepapadim can you have a look?

Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadpython/tvm/tir/usmp/__init__.py
Comment threadpython/tvm/tir/usmp/utils.py
Comment threadpython/tvm/tir/usmp/utils.py
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc
import tvm
from tvm import tir, script
from tvm.ir import Range
from tvm.script import tir as T

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be a bit of too shortened--i think pylint would complain if we ran it on tests

@manupakmanupakOct 21, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is following precedence from the code base, all the tvmscript based tests are like this. Thus, better to be consistent. Moreover, I think tvmscript printer uses this form now.

Comment threadtests/python/unittest/test_tir_usmp_analysis_extract_bufferinfo.py Outdated
Comment threadtests/python/unittest/test_tir_usmp_utils.py Outdated
@manupak
manupakforce-pushed the usmp_extract_buffer_info branch from 3e8a78e to de8e4f1CompareOctober 21, 2021 17:30

@manupakmanupak left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @areusch for the review.
PTAL when you have some time.

Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadpython/tvm/tir/usmp/__init__.py
Comment threadpython/tvm/tir/usmp/utils.py
Comment threadpython/tvm/tir/usmp/utils.py
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc
import tvm
from tvm import tir, script
from tvm.ir import Range
from tvm.script import tir as T

@manupakmanupakOct 21, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is following precedence from the code base, all the tvmscript based tests are like this. Thus, better to be consistent. Moreover, I think tvmscript printer uses this form now.

Comment threadtests/python/unittest/test_tir_usmp_analysis_extract_bufferinfo.py Outdated
Comment threadtests/python/unittest/test_tir_usmp_utils.py Outdated
@manupak

Copy link
Copy Markdown
ContributorAuthor

a friendly ping @mbs-octoml !

@mbs-octomlmbs-octoml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, finally got to this. LGTM, just some nits and a question about multiple calls to the same PrimFunc with diff buffers.

Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadinclude/tvm/tir/usmp/utils.h Outdated
/*! \brief The pool candidates that this buffer can get pooled to*/
Array<PoolInfo> pool_candidates;
/*! \brief The byte alignment required within the pool */
Integer alignment;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I guess this has to be the gcm of the alignment constraints imposed by all user's of buffer -- is there any use for an Array to capture that?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- that has to be captured at the creation of the tir.allocate node though. Therefore, at the point of BufferInfo creation that is already decided.

Comment threadpython/tvm/tir/usmp/analysis/analysis.py
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated

void UpdateAliases(const Array<PrimExpr>& args, const PrimFunc& func);

Map<BufferInfo, tir::Stmt> buffer_info_map_;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments for all these fields please

Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
}

void BufferInfoExtractor::VisitStmt_(const AllocateNode* op) {
const auto& currect_scope_info = scope_stack_.top();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: current

return buffer_vars;
}

void BufferInfoExtractor::UpdateAliases(const Array<PrimExpr>& args, const PrimFunc& func) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At most one call per function, right? Or at least if there are multiple calls then they all use the same buffers. Am I reading that right? CHECK fail if that assumption fails?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also assumes the calls are seen after the PrimFunc defns, right?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this while integrating the USMP :) in my local. Added more code to support per-call analysis that lead sporadic liveness. Also added a test case to show this as well.

Therefore, now this pass could handle multiple calls per PrimFunc.

This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
@manupak
manupakforce-pushed the usmp_extract_buffer_info branch from 10557aa to c130133CompareNovember 22, 2021 12:22

@manupakmanupak left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbs-octoml@areusch I finally got around to address the comments! PTAL when you have some time.

Comment threadinclude/tvm/tir/usmp/utils.h Outdated
Comment threadinclude/tvm/tir/usmp/utils.h Outdated
/*! \brief The pool candidates that this buffer can get pooled to*/
Array<PoolInfo> pool_candidates;
/*! \brief The byte alignment required within the pool */
Integer alignment;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- that has to be captured at the creation of the tir.allocate node though. Therefore, at the point of BufferInfo creation that is already decided.

Comment threadpython/tvm/tir/usmp/analysis/analysis.py
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
return buffer_vars;
}

void BufferInfoExtractor::UpdateAliases(const Array<PrimExpr>& args, const PrimFunc& func) {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this while integrating the USMP :) in my local. Added more code to support per-call analysis that lead sporadic liveness. Also added a test case to show this as well.

Therefore, now this pass could handle multiple calls per PrimFunc.

Comment threadsrc/tir/usmp/analysis/extract_buffer_info.cc Outdated
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
@manupak

Copy link
Copy Markdown
ContributorAuthor

@areusch a friendly ping!

alignment,
)

def set_pool_candidates(self, pool_candidates: list):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: looks like this is cruft from a previous incarnation of this PR. TODO(@manupa-arm): remove in a follow-on

@areusch
areusch merged commit 18730c4 into apache:mainNov 23, 2021
dchauhan-arm pushed a commit to dchauhan-arm/tvm that referenced this pull request Nov 29, 2021
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
yangulei pushed a commit to yangulei/tvm that referenced this pull request Jan 11, 2022
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [TIR][USMP] Added buffer info extraction pass
This commit adds a pass that takes the main (call graph of operators)
TIR PrimFunc and each operators also as TIR PrimFunc. The pass will
traverse through all TIR PrimFunc starting the from main. Thereafter,
it will extract information from tir.allocates. Among the information,
the liveness conflicts are reported.
* Added test for a linear model
* Added test for parallel/serial mixed for loops
* Added test for a substructure of inception-style model.
* Exposed buffer_info creation to python
* Added member functions to update pool info
* Unit tests to cover functionality of buffer_info
Change-Id: I5e163ac3e83c830629a5d34ed4407c9962701c60
* [TIR][USMP] Added buffer info extraction pass
Swap key-value pairs of returned values of the buffer_info
extraction pass.
Change-Id: Ia4f7289592bc776ef6189a41a7891038751bf31f
* [TIR][USMP] Added buffer info extraction pass
Updating the USMP utility tests to include tests
that test creation of PoolInfo and PoolAllocation
Objects.
Change-Id: I5d349d0ffcac6b0160072d832dd9d5418699228e
* [TIR][USMP] Added buffer info extraction pass
* Removing the unnecessary header : include/tvm/tir/usmp/analysis.h
* Some nits and cleanup
Change-Id: Iac3ddd9428c56cd8ef49cf643e797bf6fdf4e97a
* [TIR][USMP] Added buffer info extraction pass
* Change the class data members to have a trailing underscore
Change-Id: I71809b3c73b0bc0cd133fad1392ae8c17c895ee4
* [TIR][USMP] Added buffer info extraction pass
Adding more documentation for data structures
and the approach
Change-Id: Ide2bfffaeff9add86853b6992017264e5d796299
* [TIR][USMP] Added buffer info extraction pass
* Added more documentation
* Added functionality to handle multiple calls
for the same PrimFunc with a test.
Change-Id: Ib7c27b3cf17f415067a224f1e57d8b928f4c7c6f
* [TIR][USMP] Added buffer info extraction pass
* Attaching targets to PrimFuncs in the util test case
Change-Id: I82960512659a346f6242b2b5789ec1120f8ea2cf
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@manupak@junrushao@tqchen@areusch@mbs-octoml