Could I static link a model using pytorch as an elf?

Hello everyone. I want to write aten kernel for a new riscv-vector cpu which haven’t taped out and only have scmodel.

The cost of dynamic link is fairly high both on time and space, which is hard to be handled.

I’ve known that we can use AOTInductor to build an .so file to run the model. But it is still too large for the scmodel env.

Now, I’ve known that maybe I can try to use the AOTInductor or Executorch ways.
But here still have some questions:

  1. Could I built a static elf using any of these two methods?
  2. Could I still use the Aten ops by using the method choosen in “1”

I’ll build pytorch to identify these two questions.