microsoft / knossos-ksc

Compiler with automatic differentiation
Other
45 stars 10 forks source link

Does example_inputs work in generate_defs_recursive? #988

Open toelli-msft opened 3 years ago

toelli-msft commented 3 years ago

It seems that the same example_inputs is provided for every function in the call tree? Is that right? If so, is that intentional? I find it rather surprising.

https://github.com/microsoft/knossos-ksc/blob/937d8b760b979ca427e16cf25bec1fbc04a5f100/src/python/ksc/torch_frontend.py#L403-L435

awf commented 3 years ago

No, this is broken at the moment. It works only because float->float functions don't look at their example inputs. Will be fixed by #vmap