Skip to content
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

[AutoScheduler] Misc update to hardware parameter and task scheduler #7020

Merged
merged 16 commits into from
Dec 3, 2020

Conversation

merrymercy
Copy link
Member

@merrymercy merrymercy commented Dec 3, 2020

  • Expose all fields of hardware parameters to its constructor
  • Add LogEstimatedLatency to the default callback list in task scheduler.

@merrymercy
Copy link
Member Author

cc @jcf94

@merrymercy merrymercy changed the title [AutoScheduler] Mics update to hardware parameter and task scheduler [AutoScheduler] Misc update to hardware parameter and task scheduler Dec 3, 2020
Comment on lines +48 to +52
int max_shared_memory_per_block;
/*! \brief The max number of register per block. */
int max_registers_per_block;
/*! \brief The max number of threads per block. */
int max_threads_per_block;
Copy link
Member

Choose a reason for hiding this comment

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

How about exposing them under the tvm/_ffi/runtime_ctypes.py like

@property
def max_thread_dimensions(self):

This will bring convenience when we want to get these values in our HardwareParams like (mali target)

Copy link
Member Author

Choose a reason for hiding this comment

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

This is already supported by VisitAttrs

Copy link
Member

@FrozenGene FrozenGene Dec 3, 2020

Choose a reason for hiding this comment

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

What I meant is we add code wrapper using attr like this:

@property
def max_registers_per_block(self):
    """Return max registers per block"""
    return self._GetDeviceAttr(self.device_type, self.device_id, 9)

Otherwise we access these property will not be convenient like other property max_shared_memory_per_block supported before.

Copy link
Member Author

@merrymercy merrymercy Dec 3, 2020

Choose a reason for hiding this comment

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

This is irrelevant to this PR.
We can do it in other PRs.

Copy link
Member

Choose a reason for hiding this comment

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

It is ok to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please take another look and approve. Thanks!

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
python/tvm/relay/op/strategy/x86.py Outdated Show resolved Hide resolved
@merrymercy merrymercy merged commit e6c1baf into apache:main Dec 3, 2020
@merrymercy merrymercy deleted the pr-hardware-param branch December 3, 2020 23:04
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
…pache#7020)

* [AutoScheduler] Mics update to hardware parameter and task scheduler

* update

* update

* update

* update

* fix

* fix

* update

* improve warning message

* update

* lint

* update

* update

* fix

* Apply suggestions from code review

* trigger CI
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
…pache#7020)

* [AutoScheduler] Mics update to hardware parameter and task scheduler

* update

* update

* update

* update

* fix

* fix

* update

* improve warning message

* update

* lint

* update

* update

* fix

* Apply suggestions from code review

* trigger CI
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
…pache#7020)

* [AutoScheduler] Mics update to hardware parameter and task scheduler

* update

* update

* update

* update

* fix

* fix

* update

* improve warning message

* update

* lint

* update

* update

* fix

* Apply suggestions from code review

* trigger CI
Sign up for free to 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.

3 participants