Loading TOC...

admin.groupGetCntkGpuId

admin.groupGetCntkGpuId(
   $config as element(configuration),
   $group-id as (Number|String)
) as Number

Summary

This function returns the CUDA ID of the GPU used by CNTK as the default computation device. Note that this function always return the value set by admin:group-set-cntk-gpu-id, not the actual value in use. For example, the GPU ID may have been set to 2 using admin:group-set-cntk-gpu-id or through the admin GUI, and then the group:cntk-default-device was set to automatic, meaning that the effective GPU ID actually in use is GPU 0. In this situation, admin:group-get-cntk-gpu-id will return 2, instead of 0.

Parameters
$config A configuration specification, typically as returned from one of the Admin module functions.
$group-id The ID of the group. Typically, this is the result of an admin:group-get-id call.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $config := admin:get-configuration()
  let $groupid := admin:group-get-id($config, "Default")
  return admin:group-get-cntk-gpu-id($config, $groupid)
  (: returns the CUDA ID of the GPU used by CNTK as the default computation device :)

  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.