Solved by Michael_Suo in post #4 
              
              
                This tutorial is the best place to start: https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html. Of course it is not about unicode normalization; you may be have to find a cpp library that implements it (similar to what is done with opencv in the tutorial)