CUDA operations are executed asynchronously so you would need to add synchronizations to the code to profile operations properly.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier