Disallow profiling in CUDA application

Is there a way to build a CUDA application such that profiling tools (nvprof, nsys) don’t work? The only way I can think of doing this is to start a dummy CUDA profiler in the code itself, then another profiler might not work.

edit: removed motivation, to clarify

Based on three decades of software engineering experience, including reverse engineering efforts, I’d say: Forget about it.

(1) Any reasonably skilled attacker will be able to reverse engineer based on the static image alone, without running the code
(2) If you think you have some secret sauce that none of the competition is using, you are probably wrong

In competitive industries, the technical lead of the top dog in the market is often just half a year worth of technological advancement. This means you need to deploy new ideas rapidly and monetize that half-year lead.

Thanks for your insight, but do you have any knowledge on disabling CUDA profiling in the build? You didn’t answer my question at all, and I didn’t ask for your two cents on software engineering.

CUDA profiling is not a software but a hardware thing, commonly not in CUDA even if gdb debugger will be blocked there is kernel debugger, that always can work, there is a hypervisor level debugger, there is a VISA debugger inside Intel Minix inside Intel Core proccessors and chipsets, etc. You cannot block those. “start a dummy CUDA profiler” you can also debug profillers and debuggers, you can run a gdb to debug gdb, or gdb to debug gdb debugging gdb.