Updated on 2022-03-13 GMT+08:00

Running an Operator

After the custom operator code is written, you can append the operator calling statement to the *.py code of the operator as follows. Construct the input data by referring to Operator Running Verification and use it to check the operator execution result.

For example:

if __name__ == "__main__":
    reduction((2, 3, 4), "float16", 1, "SUM", coeff = 2,kernel_name = "Reduction")