-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Update topi/cuda schedules to use target.max_num_threads #577
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
Conversation
python/tvm/target.py
Outdated
|
|
||
|
|
||
| def get_max_num_threads(): | ||
| """Returns the maximum number of threads under current target. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed
python/tvm/target.py
Outdated
|
|
||
|
|
||
| def get_max_num_threads(): | ||
| """Returns the maximum number of threads under current target. |
There was a problem hiding this comment.
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)
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).