Building BYOC files in tvm

hi, i am trying to include a custom codegen in tvm , and have followed below steps to do it:

  1. create a codegen inside src/relay/backend/contrib/custom_codegen.cc . and regsitered the codegen using TVM_REGISTER_GLOBAL("relay.ext.CUSTOM").set_body_typed(CustomCompiler); api
  2. Added rules for annotating the operations for the custom compiler in python/tvm/relay/op/contrib/custom.py
  3. Created a cmake file to include the codegen files in cmake/modules/contrib/CUSTOM.cmake.
  4. Added the fag in config.cmake file to use the custom compiler as set(USE_CUSTOM ON)

but while building the tvm from scratch , i dont see any compilation of my codegen , whereas if i build it for DNNL codegen , i can see the compiler codegen files.
Also while calling relay.build() , passing a relay module partitionted for custom compiler , its throwing below error:
Check failed: (pf) is false: Failed to find the external codegen tool for relay.ext.CUSTOM

which makes me wonder what other steps i have to perform for tvm to recognise my codegen and start compiling it.
Any help would be largely appreciated. thanks

Did you include cmake/modules/contrib/CUSTOM.cmake in CMakeLists.txt?

hi @slai-nick thanks for the quick response , after figuring out the cmake flow, i included the custom.cmake in cmakelist, and now tvm is able to recognise and compile the codegen. thank you:)