Inlining a custom triton kernel

Hi all,
I have a custom backend, and can successfully generate triton codes torch models via torchInductor and run them on my tritn backend. I am trying to incorporate user-defined triton kernels by following the example in Using User-Defined Triton Kernels with torch.compile — PyTorch Tutorials 2.4.0+cu124 documentation. However, for me, the example breaks with this failure:

torch._dynamo.exc.Unsupported: builtin: setattr [<class ‘torch._dynamo.variables.functions.UserFunctionVariable’>, <class ‘torch._dynamo.variables.constant.ConstantVariable’>, <class ‘torch._dynamo.variables.functions.UserFunctionVariable’>] False

The issue seems to be raised by the inlining process. It comes from this line pytorch/torch/_dynamo/symbolic_convert.py at main · pytorch/pytorch (github.com) in dynamo.

I dumped the inst:
Instruction(opcode=95, opname='STORE_ATTR', arg=3, argval='excepthook_ori', offset=16, starts_line=67, is_jump_target=False, positions=None, target=None, exn_tab_entry=None)

Note:If I set fullgraph=Flase everything works as they should but it lowers the model’s performance.

How should I resolve the issue when fullgraph=True?