hidet-org/hidet

the freedom for search_space?

RedBlack888 opened this issue · 3 comments

could you tell me the the freedom for search_space.

Best

Hi @RedBlack888,

The search_space option specifies the search space we want to explore for the tunable operators. There are valid choices for this option:

# 0 - use default schedule, no search [Default]
hidet.torch.dynamo_config.search_space(0)

# 1 - search in a small schedule space (usually 1~30 schedules)
hidet.torch.dynamo_config.search_space(1)

# 2 - search in a large schedule space (usually more than 30 schedules)
hidet.torch.dynamo_config.search_space(2)

Thank you for your introduction.
I would like to know the differences between different configuration schemes ?

Best

For each tunable operator (e.g., matmul), hidet has multiple implementations that have the same functionality but different performance. For different input sizes for this operator, the optimal choice of the implementation would be different, thus we need to tune the operator to find the best implementation for each input size.

The search space option determines how many implementations we would try. 0 indicates we directly use the default implementation for all input sizes. Search space 1 indicates we search in a small group of implementations and 2 indicates a large group of implementations.