def sample_predictor_configs(self): config = CxxConfig() config.set_valid_places( {Place(TargetType.ARM, PrecisionType.FP32, DataLayoutType.NCHW)}) config.set_threads(1) yield config, ["fusion_elementwise_add_activation"], (1e-5, 1e-5)
def target_to_predictor_configs(self, target: str) -> List[CxxConfig]: configs_ = [] for elem_ in self.valid_places: if target in elem_[0]: for thread_ in self.thread_num: config_ = CxxConfig() config_.set_valid_places(elem_) config_.set_threads(thread_) configs_.append(config_) return configs_
def target_to_predictor_configs(self, target: str) -> List[CxxConfig]: configs_ = [] for elem_ in self.valid_places: if target in elem_[0]: for thread_ in self.thread_num: config_ = CxxConfig() config_.set_valid_places(elem_) config_.set_threads(thread_) if target.upper() == "NNADAPTER": self.nnadapter_config_set(self, config_) configs_.append(config_) return configs_
def sample_predictor_configs(self): config = CxxConfig() config.set_valid_places({ Place(TargetType.OpenCL, PrecisionType.FP16, DataLayoutType.ImageDefault), Place(TargetType.OpenCL, PrecisionType.FP16, DataLayoutType.ImageFolder), Place(TargetType.OpenCL, PrecisionType.FP32, DataLayoutType.NCHW), Place(TargetType.OpenCL, PrecisionType.Any, DataLayoutType.ImageDefault), Place(TargetType.OpenCL, PrecisionType.Any, DataLayoutType.ImageFolder), Place(TargetType.OpenCL, PrecisionType.Any, DataLayoutType.NCHW), Place(TargetType.X86, PrecisionType.FP32), Place(TargetType.ARM, PrecisionType.FP32), Place(TargetType.Host, PrecisionType.FP32) }) config.set_threads(1) yield config, ['elementwise_mul'], (1e-5, 1e-5)
def sample_predictor_configs(self): config = CxxConfig() config.set_valid_places( {Place(TargetType.ARM, PrecisionType.FP32, DataLayoutType.NCHW)}) config.set_threads(1) yield config, ["shuffle_channel"], (1e-5, 1e-5)
def sample_predictor_configs(self): config = CxxConfig() config.set_valid_places( {Place(TargetType.ARM, PrecisionType.Any, DataLayoutType.NCHW)}) config.set_threads(1) yield config, ["lookup_table_dequant"], (1e-5, 1e-5)
def sample_predictor_configs(self): config = CxxConfig() config.set_valid_places( {Place(TargetType.Host, PrecisionType.FP32, DataLayoutType.NCHW)}) config.set_threads(1) yield config, ["one_hot_v2"], (1e-5, 1e-5)