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

44 lines
905 B

1 year ago
  1. #pragma once
  2. #include <cstdint>
  3. namespace fsdk {
  4. /**
  5. * @brief DeviceClass specifies which device/instruction set
  6. * to use for cnn inference.
  7. * */
  8. enum class DeviceClass : int32_t {
  9. CPU = 0,
  10. GPU = 1,
  11. CPU_ARM = 2,
  12. CPU_AVX2, // CPU with AVX2/SSE4.2 ISA support
  13. GPU_INT8, // GPU with INT8 inference. Only Pascal+
  14. CPU_ARM_INT8,
  15. GPU_MOBILE, // GPU for mobiles
  16. NPU_ASCEND,
  17. Invalid = -1
  18. };
  19. /**
  20. * @brief LaunchOptions struct configures inference options on
  21. * per-estimator/detector basis, giving user fine grained
  22. * control over cpu/gpu utilisation.
  23. * */
  24. struct LaunchOptions {
  25. DeviceClass deviceClass = DeviceClass::CPU;
  26. // Cpu options
  27. bool runConcurrently = true;
  28. //External device options (GPU/NPU etc.)
  29. //Use defaultGpuDevice from runtime configuration
  30. static constexpr int32_t defaultDeviceId = -1;
  31. int32_t deviceId = defaultDeviceId;
  32. };
  33. }