Skip to content

improve device range handling

  • avoid undefined behaviour when passing a device integer representation (Fortran) to enum mm_device (C). Instead provide an INVALID_DEVICE entry within enum mm_device to represent out-of-range values.
  • mm_get_device_count should return the usable number of devices. Also: MM_NUM_MAX_GPU has no role in application code.
  • num_gpus = mm_get_device_count() defines the range of valid GPUs: from 0 to num_gpus - 1
  • start to use mmi_ prefix naming scheme for interop code
  • if context creation fails: set context to INVALID_DEVICE_CTX instead of undefined behaviour
Edited by Joerg Behrens

Merge request reports

Loading