Workaround for index_add / masked_scatter

I’m currently trying to export a model to ONNX and run it using an external library that parses ONNX. Unfortunately my model uses index_add and masked_scatter and the external library can’t parse the ONNX operations these two are transformed into (I believe index_add doesn’t even have an ONNX equivalent for opset 11 which is what I’m using). Is there any way I can rewrite these operations into “simpler” ONNX compatible operations, without a major dip in performance (i. e. without having to write explicit for loops in python)?