Is it necessary to set LD_LIBRARY_PATH?

Now I have installed both cuda and cudnn using deb (network) in Ubuntu, and everything works fine.

I notice that

when using the runfile installation method, the LD_LIBRARY_PATH variable needs to contain …

So, is it true that if the cuda is installed in a NON-runfile method, then it is not necessary to set LD_LIBRARY_PATH? In my case, even if I did not set it, I can pass the tests in the example folder.