catalyst
catalyst copied to clipboard
Runtime device kwargs cannot take in values with curly brakets or nested dictionaries
trafficstars
Due to an implementation detail, namely the way the device kwargs are parsed in the runtime , there is an implicit assumption that the values of the kwargs, when converted to strings, cannot have curly brackets.
For example (pseudocode):
kwargs = "{ 'test' : '{5:{6:3.14}, 1:2, 3:4}' }"
std::cout << parse_kwargs(kwargs)["test"];
----------
5:6:3.14
This causes issues when, for example, a python dictionary is passed in as a kwarg, or if some devices pass in a JSON schema as a kwarg during that device's dialect lowering.