下载
中文
注册

ReductionConfig

API定义

inline ReductionConfig(std::vector<int> deviceList, const char *model, uint64_t modelSize);

功能描述

ReductionConfig的默认构造函数,当用户使用“NN”降维时,使用该函数。

输入

std::vector<int> deviceList:Device侧资源配置。

const char *model:神经网络降维模型。

uint64_t modelSize:模型的大小。

输出

返回值

约束说明

  • deviceList取值范围(0, 32]。
  • 使用不同的降维算法,需要配置对应的参数并且降维后的维度需要满足后续使用降维数据Index的维度限制。
  • “model”需要为合法有效的深度网络降维模型的内存指针,大小为“modelSize”,modelSize取值范围为(0, 128MB],参数不匹配可能造成模型实例化或推理失败。非法的模型可能会对系统造成危害,请确保模型的来源合法有效。
    • dimsIn ∈ {64, 128, 256, 384, 512, 768, 1024}。
    • dimsOut ∈ {32, 64, 96, 128, 256,}。
    • batches ∈ {1, 2, 4, 8, 16, 32, 64, 128}