@@ -206,7 +206,6 @@ module type Device = sig
206206 val get_name : stream -> string
207207end
208208
209-
210209(* * Parts shared by assignments-level backend interfaces. *)
211210module type Backend_common = sig
212211 include Buffer
@@ -290,12 +289,18 @@ module type With_buffer_retrieval_and_syncing = sig
290289 type event
291290
292291 val from_host : context -> Tnode .t -> bool
293- (* * If the tensor node is both hosted and in-context, schedules a copy from host to context and
294- returns true, otherwise returns false. *)
292+ (* * If the tensor node is both hosted and in-context, schedules a copy(^) from host to context and
293+ returns true, otherwise returns false.
294+
295+ [^] On unified memory devices, the copy is not scheduled if the source and destination are the
296+ same buffer (note that this depends on the memory mode of the tensor node). *)
295297
296298 val to_host : context -> Tnode .t -> bool
297- (* * If the tensor node is both hosted and in-context, schedules a copy from context to host and
298- returns true, otherwise returns false. *)
299+ (* * If the tensor node is both hosted and in-context, schedules a copy(^) from context to host and
300+ returns true, otherwise returns false.
301+
302+ [^] On unified memory devices, the copy is not scheduled if the source and destination are the
303+ same buffer (note that this depends on the memory mode of the tensor node). *)
299304
300305 val device_to_device :
301306 Tnode .t -> into_merge_buffer :merge_buffer_use -> dst :context -> src :context -> bool
0 commit comments