Browse Source

adapt vm topk

tags/v0.3.0-alpha
zhaozhenlong 5 years ago
parent
commit
cc9dc69f2f
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      mindspore/ops/_op_impl/tbe/top_k.py

+ 7
- 5
mindspore/ops/_op_impl/tbe/top_k.py View File

@@ -19,14 +19,16 @@ from mindspore.ops.op_info_register import op_info_register, TBERegOp, DataType
top_k_op_info = TBERegOp("TopK") \
.fusion_type("OPAQUE") \
.async_flag(False) \
.binfile_name("top_k.so") \
.binfile_name("top_k_d.so") \
.compute_cost(10) \
.kernel_name("top_k") \
.kernel_name("top_k_d") \
.partial_flag(True) \
.attr("k", "required", "int", "all")\
.attr("sorted", "required", "bool", "all")\
.attr("dim", "optional", "int", "all") \
.attr("k", "required", "int", "all") \
.attr("largest", "optional", "bool", "all") \
.attr("sorted", "optional", "bool", "true")\
.input(0, "x", False, "required", "all") \
.input(1, "input_indices", False, "optional", "all") \
.input(1, "assist_seq", False, "required", "all") \
.output(0, "values", False, "required", "all") \
.output(1, "indices", False, "required", "all") \
.dtype_format(DataType.F16_Default, DataType.F16_Default, DataType.F16_Default, DataType.I32_Default) \


Loading…
Cancel
Save