提交 047d7f42 编写于 作者: L liuqi

Fix some typo and remove unsed code.

上级 5f5fa20b
......@@ -25,7 +25,7 @@ void BufferToImageFunctor<DeviceType::OPENCL, T>::operator()(Tensor *buffer,
std::set<std::string> built_options;
built_options.emplace("-DDATA_TYPE=" + DataTypeToCLType(image->dtype()));
built_options.emplace("-DCMD_DATA_TYPE=" + DataTypeToOpenclCMDDataType(image->dtype()));
built_options.emplace("-DCMD_DATA_TYPE=" + DataTypeToOPENCLCMDDataType(image->dtype()));
auto runtime = OpenCLRuntime::Get();
string kernel_name;
switch (type) {
......
......@@ -26,7 +26,7 @@ static void Conv2d3x3S12(const Tensor *input, const Tensor *filter,
std::set<std::string> built_options;
built_options.emplace("-DDATA_TYPE=" + DataTypeToCLType(input->dtype()));
built_options.emplace("-DCMD_DATA_TYPE=" + DataTypeToOpenclCMDDataType(input->dtype()));
built_options.emplace("-DCMD_DATA_TYPE=" + DataTypeToOPENCLCMDDataType(input->dtype()));
built_options.emplace(bias != nullptr ? "-DBIAS" : "");
auto runtime = OpenCLRuntime::Get();
......
......@@ -17,7 +17,7 @@ void CalInOutputImageShape(const std::vector<index_t> &shape, /* NHWC */
image_shape[1] = shape[0] * shape[1];
}
// [H * W * 4, (Oc + 3) / 4]
// [H * W * RoundUp<4>(Ic), (Oc + 3) / 4]
void CalFilterImageShape(const std::vector<index_t> &shape, /* HWIO*/
std::vector<size_t> &image_shape) {
MACE_CHECK(shape.size() == 4);
......@@ -82,7 +82,7 @@ std::string DataTypeToCLType(const DataType dt) {
}
}
std::string DataTypeToOpenclCMDDataType(const DataType dt) {
std::string DataTypeToOPENCLCMDDataType(const DataType dt) {
switch (dt) {
case DT_FLOAT:
return "f";
......
......@@ -19,7 +19,7 @@ void CalImage2DShape(const std::vector<index_t> &shape, /* NHWC */
const BufferType type,
std::vector<size_t> &image_shape);
std::string DataTypeToOpenclCMDDataType(const DataType dt);
std::string DataTypeToOPENCLCMDDataType(const DataType dt);
std::string DataTypeToCLType(const DataType dt);
......
......@@ -467,6 +467,7 @@ static void TestComplexConvNxNS12(const std::vector<index_t> &shape) {
OpDefBuilder("Conv2D", "Conv2dTest")
.Input("Input")
.Input("Filter")
.Input("Bias")
.Output("Output")
.AddIntsArg("strides", {stride_h, stride_w})
.AddIntArg("padding", type)
......@@ -493,6 +494,7 @@ static void TestComplexConvNxNS12(const std::vector<index_t> &shape) {
OpDefBuilder("Conv2D", "Conv2dTest")
.Input("InputImage")
.Input("FilterImage")
.Input("BiasImage")
.Output("OutputImage")
.AddIntsArg("strides", {stride_h, stride_w})
.AddIntArg("padding", type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册