mpc-msri / EzPC

MIT License
401 stars 122 forks source link

OnnxBridge can not handle reused constant #210

Open yyz233 opened 7 months ago

yyz233 commented 7 months ago

I've discovered that OnnxBridge struggles with handling reused constants in ONNX when using SECFLOAT as the backend. For instance, if a reshape constant (10, -1) is used in two different reshape nodes in an ONNX model, OnnxBridge will create the data 10.0, -1.0 and duplicate it in the model_weight.inp file. However, in the generated .cpp file, these values are not inputted twice, which causes an issue where all data after it cannot be read correctly.