comaniac commented on a change in pull request #4465: [AutoTVM] Tune softmax
CUDA schedule
URL: https://github.com/apache/incubator-tvm/pull/4465#discussion_r355106974
##########
File path: topi/python/topi/cuda/softmax.py
##########
@@ -52,13 +60,22 @@ def schedule_softmax(outs):
raise ValueError('Tag is expected to be softmax_output or
log_softmax_output. \
Got {0}'.format(op_tag))
+ # create tuning space
+ max_num_threads =
tvm.target.current_target(allow_none=False).max_num_threads
+ possible_num_thread = get_powers_of_two_in_range(32, max_num_threads)
+ cfg.define_knob("num_thread", possible_num_thread)
Review comment:
I personally think it would be better to use `define_split` directly so that
this part could be more concise. `define_split` also has an option to use all
power of two numbers in a given range as candidates.
In addition, do you think if there will bring any improvements if we create
two knobs used at `s[expsum].split(k, factor=num_thread)` and
`s[softmax].split(softmax.op.axis[1], nparts=num_thread)`? Maybe we need
differernt thread number if `k` and `softmax.op.axis[1]` are different, but
that will also increase the tuning space so I'm not 100% for sure if this is a
good idea.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services