You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DeviceUtils.cs 588 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Tensorflow.Device
  5. {
  6. internal static class DeviceUtils
  7. {
  8. public static string canonical_name(string device)
  9. {
  10. if(device is null)
  11. {
  12. return "";
  13. }
  14. return DeviceSpec.from_string(device).ToString();
  15. }
  16. public static string canonical_name(DeviceSpec device)
  17. {
  18. if (device is null)
  19. {
  20. return "";
  21. }
  22. return device.ToString();
  23. }
  24. }
  25. }