Right, that was my initial thoughts.
Although my intial question was: *can the generated code not bother about filling the output tensor with some values?* But I realise that the question is a stupid as `out` is already allocated, whether its content is relevant or not shouldn't create any major bug when playing. To illustrate what I meant, let's say in the documentation example I replace the macros to: ``` #define CSOURCE_BINARY_OP_1D(p_ID_, p_OP_, p_DIM1_) \ extern "C" void p_ID_(float* a, float* b, float* out) { \ printf("I am calling a 1D op\n"); \ } ``` > As the document indicates, you should apply a series of passes from > AnnotateTarget to PartitionGraph. I think everything starts to connect now, to recap (correct me if I am wrong): I need to write `python/tvm/relay/op/contrib/{CODEGEN_NAME}.py` to tell tvm how to partition my graph for my codegen. The bare minimum this file should contain is: * registering external op used by my codegen * defining a function with the name `partition_for_{CODEGEN_NAME}(mod, params=None)` that applies transformations to `mod`, including at least: 1. `AnnotateTarget("{CODEGEN_NAME"})` 2. `PartitionGraph()` If I have correctly built tvm with my codegen and have provided the mentionned python file then when building for llvm target tvm will automatically use the `partition_for_{MY_CODEGEN}` function. --- [Visit Topic](https://discuss.tvm.apache.org/t/byoc-details-about-byoc-newbie/12190/5) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/703801d3daab604b5aca4fa42d76a2df9353d3b04f605356447aa76932d33c81).