oneflow.nn.graph.graph_config.GraphConfig.enable_cudnn_conv_heuristic_search_algo

GraphConfig.enable_cudnn_conv_heuristic_search_algo(mode: bool = True)

Whether enable cudnn conv operation to use heuristic search algorithm.

Note

It is recommended to use flow.backends.cudnn.enable_conv_heuristic_search_algo(False) instead of this function.

For example:

import oneflow as flow

class Graph(flow.nn.Graph):
    def __init__(self):
        super().__init__()
        self.m = flow.nn.Conv2d(16, 32, (3, 5), stride=(2, 1), padding=(4, 2), dilation=(3, 1))
        # Do not enable the cudnn conv operation to use the heuristic search algorithm.
        self.config.enable_cudnn_conv_heuristic_search_algo(False)
    def build(self, x):
        return self.m(x)

graph = Graph()
Parameters

mode (bool, optional) – The default value is True.