How to get relationship between api and operator?

I am trying to reduce the test work in the task which called "every version of pytorch or cuda published, run the all testcase to make sure it does not make our model bad " . It’s too much and too expensive. So I am going to find the relationship. While any code changed in one of those relationship, all I need to do is run the testcase those include the api which involed. If the testcase ok , our Model OK.

So can I get the relationship from anywhere, like a doc or use python/Java/C++ .

Thanks anyone who see or give the advice!