The purpose of both the tools is quite different. CUPTI enables the creation of profiling and tracing tools that target CUDA applications. Using CUPTI APIs, one can develop profiling tools that give insight into the CPU and GPU behavior of CUDA applications. NVIDIA profiling tools nvprof, NVVP and Nsight Systems are layered on top of the CUPTI to capture the CUDA API trace, GPU activity trace, GPU Performance counters and metrics, PC Sampling, Unified Memory profiling, NVLink stats, OpenACC profiling etc etc
On the other hand, NVTX is used for annotating events, code ranges, and resources in the application. It doesn’t provide timing or the GPU trace information. NVTX is used in conjunction with the other Profiling tools like Visual Profiler, Nsight Systems, NSight Visual Studio Edition to capture and visualize annotation and ranges.
Next-gen Nsight tools are replacing nvprof and NVVP. Refer blog post https://devblogs.nvidia.com/migrating-nvidia-nsight-tools-nvvp-nvprof for the migration plan.