Where can I find the source code of sync_to_device()


I want to deep dive into the principle of ‘buffer.sync_to_device()’ method.

However, I can not find where the internal source code is.

Could anyone can let me know where the internal source code of

“self.device.flush(self.bo, self.offset, self.virtual_address, self.nbytes)” which is sync_to_device() is?

Thanks in advance!

Hi @leelemni,

Welcome to our community.

The source code is in the xrt_device file


Thank you!!