gtensor icon indicating copy to clipboard operation
gtensor copied to clipboard

device debug print helper

Open bd4 opened this issue 3 years ago • 1 comments

With the new default backend (not using thrust), it's not easy to print a single value or small range of values out of a device gtensor object.

Possible APIs:

  • member function, .host_view(...slice..), normal view if is host accessible, otherwise copies
  • free function, gt::device_print(a, ...slice...)

bd4 avatar Nov 28 '22 18:11 bd4

one advantage of host_view type API, is it could be used in tests to avoid an explicit host vector declaration and copy.

bd4 avatar Nov 28 '22 18:11 bd4