Skip to content

Conversation

@masahi
Copy link
Member

@masahi masahi commented Oct 22, 2017

Update topi/cuda schedules to be consistent with #556.

With this commit, all unit tests in topi should pass out of the box with ROCm and OpenCL backend.
For OpenCL backend, I only checked it with AMD device (R9 Nano).



def get_max_num_threads():
"""Returns the maximum number of threads under current target.
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove this function and simply use tvm.target.current_target().max_num_threads?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can tvm.target.current_target() be None?

Copy link
Member Author

@masahi masahi Oct 22, 2017

Choose a reason for hiding this comment

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

I did this following your usage of max_num_threads here

Copy link
Member

Choose a reason for hiding this comment

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

use tvm.target.current_target(allow_missing=False)

Copy link
Member

Choose a reason for hiding this comment

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

I just think we should remove this function and inline its body to the callers

Copy link
Member

Choose a reason for hiding this comment

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

since the function itself is small(one line)

Copy link
Member Author

@masahi masahi Oct 22, 2017

Choose a reason for hiding this comment

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

ok

tvm.target.current_target(allow_none=False).max_num_threads
right?

Copy link
Member

Choose a reason for hiding this comment

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

k

Copy link
Member Author

Choose a reason for hiding this comment

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

pushed



def get_max_num_threads():
"""Returns the maximum number of threads under current target.
Copy link
Member

Choose a reason for hiding this comment

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

since the function itself is small(one line)

@tqchen tqchen merged commit 1221835 into apache:master Oct 23, 2017
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.

2 participants