(Sorry I missed this, went to spam for whatever reason.)
Good observation -- the short answer is I think it should be kIdentity. :-) The long answer might be informative though.
So, before we added SpecializationKind (
https://github.com/google/xls/blob/24e43640ea34b39a5ea474d9031b4e1c48142c9a/xls/delay_model/delay_model.proto#L60 -- which was introduced in Mar 2020 before we were open sourced) we had /fake/ operation names like kMulSquare (to represent that the mul had the same operands as the left hand side and right hand side), and then it was the responsibility of the delay model generator to slurp up the data points with these extended operation names and spit out code that would use normal C++ xls::Node opcodes and the node's properties.
Of course, making the schema more expressive, so it could describe the scenarios without relying on fake operations encoded as strings, was a clearer way to do it, so SpecializationKind was added.
As a result, we could/should now probably make sure the "op" field corresponds to an actual XLS Op as in the C++ enum-class. We'd just need to extend our Op generator to spit out op.proto and then we could use that in the schema instead of the stringy solution we have now.
Hope that helps put it into context!
- Leary
---
Aside: just talking out loud tracing some things backwards, the op value is used directly as a member of the XLS "Op" (C++ enum-class) here:
That is the DelayModel Python object:
Whose ops come from the "op models":
Which is the "op" field of OpModel proto messages:
---
.. [*] Right now we generate the C++ for the DelayEstimator implementation from Python via a template, but it'd be kind of nice to remove the generation step if we could find substitutes for the scipy interpolation routines we're using that wouldn't take on large dependencies -- code generation is powerful but this is one of those cases where it doesn't feel essentially necessary.