What is the difference between the two APIs *CUDBGAPI_st::readVirtualPC and *CUDBGAPI_st::readPC

Hi,

@agontarek

What is the difference between the two APIs *CUDBGAPI_st::readVirtualPC and *CUDBGAPI_st::readPC?
Do cpu and gpu share a virtual address space?

https://docs.nvidia.com/cuda/debugger-api/structCUDBGAPI__st.html#group__READ_1gb8f4830c29701bae9198de2351f51985

https://docs.nvidia.com/cuda/debugger-api/group__READ.html#group__READ_1g4e5d98dced2544bbe90d0a9483527f3f

Thanks for getting in touch. I’ve reached out to the engineering team to get some more details. I’ll let you know when I hear back.

Hi @204540478
Thank you for your question.

  • readPC method returns the PC of the given active lane as an offset from the current function start PC.
  • readVirtualPC method returns global virtual PC

readPC + current function start PC == readVirtualPC

Do cpu and gpu share a virtual address space?

Yes, this is the case for most modern chips. If you are interested in a specific chip, please let us know and we can provide more details answer.

AKravets has made it clear to me, thank you very much.

I understand. Thank you very much for your patience.