Is there a way to use torch indcutor to compile an optimized fx graph?

Hi there,

I am wondering if there is a way use torch inductor to compile a customed optimized fx graph after i use torch dynamo custom backend to first optimize the fx graph like this:

def toy_backend(gm, sample_inputs):
   def my_compiler(gm, sample_inputs):
    # do some graph rewrtie for fx graph in aten ir 
    matches = subgraph_rewriter.replace_pattern(gm, gelu_pattern, gelu_tanh_replacement)
    return gm

    return aot_module_simplified(
        gm,
        sample_inputs,
        fw_compiler=my_compiler
    )

fn = torch.compile(backend=toy_backend, dynamic=True)(model)

Thanks!