So the above hints at CMake seeing both find_package statements in one invocation.
If it’s in the same CMake project, I think you can use find_package once and then use the torch “environment” set up by CMake for both.
Best regards
Thomas