-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't create useless FunctionGraph
in linker tests
#1022
Comments
I would like to work on this issue. Thanks. |
Feel free to open a PR |
How do I test for the jax and pytorch backend scripts? Cause when I run the test suite in the test directory I don't see those scripts being run. Thanks. |
You need to install those packages as they're optional. Otherwise the tests are skipped automatically |
I’m currently working on the issue and have noticed a few things. While the FunctionGraph’s handling of inputs and outputs may seem unnecessary, it actually improves code writability. When initializing the FunctionGraph, we can simply provide the outputs to the graph and the corresponding inputs are understood by the graph implicitly. This is especially helpful when dealing with many inputs, saving time and effort. IMHO Unless removing the FunctionGraph significantly enhances performance or memory usage of the test, I believe we should keep it. Thank you. |
You need to specify test values for the inputs so there's already a need to manually specify the inputs anyway. |
If we are removing the set_test_value machinery then that would mean all the inputs we are passing would be constants right?(not variables) |
The variables can be initialized the very same way without the test values attached to it. Don't need (and shouldn't) be replaced by constants |
@ricardoV94 In a lot of places the input values are set through the test values of variables (especially when we use @pytest.mark.parametrize), if the test values are not attached to the variables how should we access them? |
Change parametrize to be a tuple of (variable, test_values) instead |
@ricardoV94 please let me know about further steps to be taken. Thanks. |
Description
Our Numba/JAX/PyTorhch backends create a FunctionGraph that is passed to
compare_py_and_x
, but this is useless. We only use it to extract the inputs/outputs, so we could pass those directly.Also the whole
set_test_value
/get_test_value
nonsense. We are deprecating the test value machinery, so we should just pass the test values directly without setting/getting them.The text was updated successfully, but these errors were encountered: