CUDA 12.x has dropped support for Kepler compute 3.x devices.
The minimum supported compute capability is 5.0 in CUDA 12.
If you require support for cc3.5, you will need to use an older CUDA version, however your GTX 1070 is a cc6.1 device and it is supported by CUDA 12. If you want to tackle it that way (recommended), then look thru your project build system (CMakeLists.txt, etc.) and find out where/how compute 3.5 (compute_35) is being requested and try changing that to cc 61 (compute_61).
Thank you for highlighting the issue. My CMakeLists.txt was actually calling for a couple of supported version, which also included 3.5. Removing 3.5 solved it.