f052f43b3b
Change-Id: If04d1155173fba8d3e050f3259da8b3edc60e076
585 Zeilen
43 KiB
HTML
585 Zeilen
43 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|
<title>HIP: Heterogenous-computing Interface for Portability: Device Management</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">HIP: Heterogenous-computing Interface for Portability
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Device Management<div class="ingroups"><a class="el" href="group__API.html">HIP API</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:gaefdc2847fb1d6c3fb1354e827a191ebd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd">hipDeviceSynchronize</a> (void)</td></tr>
|
|
<tr class="memdesc:gaefdc2847fb1d6c3fb1354e827a191ebd"><td class="mdescLeft"> </td><td class="mdescRight">Waits on all active streams on current device. <a href="#gaefdc2847fb1d6c3fb1354e827a191ebd">More...</a><br/></td></tr>
|
|
<tr class="separator:gaefdc2847fb1d6c3fb1354e827a191ebd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga8d57161ae56a8edc46eeda447417bf6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga8d57161ae56a8edc46eeda447417bf6c">hipDeviceReset</a> (void)</td></tr>
|
|
<tr class="memdesc:ga8d57161ae56a8edc46eeda447417bf6c"><td class="mdescLeft"> </td><td class="mdescRight">The state of current device is discarded and updated to a fresh state. <a href="#ga8d57161ae56a8edc46eeda447417bf6c">More...</a><br/></td></tr>
|
|
<tr class="separator:ga8d57161ae56a8edc46eeda447417bf6c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga43c1e7f15925eeb762195ccb5e063eae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga43c1e7f15925eeb762195ccb5e063eae">hipSetDevice</a> (int deviceId)</td></tr>
|
|
<tr class="memdesc:ga43c1e7f15925eeb762195ccb5e063eae"><td class="mdescLeft"> </td><td class="mdescRight">Set default device to be used for subsequent hip API calls from this thread. <a href="#ga43c1e7f15925eeb762195ccb5e063eae">More...</a><br/></td></tr>
|
|
<tr class="separator:ga43c1e7f15925eeb762195ccb5e063eae"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7e0e2e8c5f78e3c7449764657c254e0a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga7e0e2e8c5f78e3c7449764657c254e0a">hipGetDevice</a> (int *deviceId)</td></tr>
|
|
<tr class="memdesc:ga7e0e2e8c5f78e3c7449764657c254e0a"><td class="mdescLeft"> </td><td class="mdescRight">Return the default device id for the calling host thread. <a href="#ga7e0e2e8c5f78e3c7449764657c254e0a">More...</a><br/></td></tr>
|
|
<tr class="separator:ga7e0e2e8c5f78e3c7449764657c254e0a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga8555d5c76d88c50ddbf54ae70b568394"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394">hipGetDeviceCount</a> (int *count)</td></tr>
|
|
<tr class="memdesc:ga8555d5c76d88c50ddbf54ae70b568394"><td class="mdescLeft"> </td><td class="mdescRight">Return number of compute-capable devices. <a href="#ga8555d5c76d88c50ddbf54ae70b568394">More...</a><br/></td></tr>
|
|
<tr class="separator:ga8555d5c76d88c50ddbf54ae70b568394"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga7080a145a4239a7276e0dc22062026c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga7080a145a4239a7276e0dc22062026c1">hipDeviceGetAttribute</a> (int *pi, <a class="el" href="group__GlobalDefs.html#gacc0acd7b9bda126c6bb3dfd6e2796d7c">hipDeviceAttribute_t</a> attr, int deviceId)</td></tr>
|
|
<tr class="memdesc:ga7080a145a4239a7276e0dc22062026c1"><td class="mdescLeft"> </td><td class="mdescRight">Query for a specific device attribute. <a href="#ga7080a145a4239a7276e0dc22062026c1">More...</a><br/></td></tr>
|
|
<tr class="separator:ga7080a145a4239a7276e0dc22062026c1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga32208513b7cd491f0cb5fc884053f790"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga32208513b7cd491f0cb5fc884053f790">hipGetDeviceProperties</a> (<a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> *prop, int deviceId)</td></tr>
|
|
<tr class="memdesc:ga32208513b7cd491f0cb5fc884053f790"><td class="mdescLeft"> </td><td class="mdescRight">Returns device properties. <a href="#ga32208513b7cd491f0cb5fc884053f790">More...</a><br/></td></tr>
|
|
<tr class="separator:ga32208513b7cd491f0cb5fc884053f790"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaada3d30a46ae06f68cf1574f496b86ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#gaada3d30a46ae06f68cf1574f496b86ee">hipDeviceSetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> cacheConfig)</td></tr>
|
|
<tr class="memdesc:gaada3d30a46ae06f68cf1574f496b86ee"><td class="mdescLeft"> </td><td class="mdescRight">Set L1/Shared cache partition. <a href="#gaada3d30a46ae06f68cf1574f496b86ee">More...</a><br/></td></tr>
|
|
<tr class="separator:gaada3d30a46ae06f68cf1574f496b86ee"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga37057f9830ad6fab7ce5f05f6d3c89ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga37057f9830ad6fab7ce5f05f6d3c89ab">hipDeviceGetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> *cacheConfig)</td></tr>
|
|
<tr class="memdesc:ga37057f9830ad6fab7ce5f05f6d3c89ab"><td class="mdescLeft"> </td><td class="mdescRight">Set Cache configuration for a specific function. <a href="#ga37057f9830ad6fab7ce5f05f6d3c89ab">More...</a><br/></td></tr>
|
|
<tr class="separator:ga37057f9830ad6fab7ce5f05f6d3c89ab"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaa72baeb520f1d52fe17817e852937218"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#gaa72baeb520f1d52fe17817e852937218">hipDeviceGetLimit</a> (size_t *pValue, hipLimit_t limit)</td></tr>
|
|
<tr class="memdesc:gaa72baeb520f1d52fe17817e852937218"><td class="mdescLeft"> </td><td class="mdescRight">Get Resource limits of current device. <a href="#gaa72baeb520f1d52fe17817e852937218">More...</a><br/></td></tr>
|
|
<tr class="separator:gaa72baeb520f1d52fe17817e852937218"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga82f0637f09eb1082f6fd025f76c2c6f5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga82f0637f09eb1082f6fd025f76c2c6f5">hipFuncSetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> config)</td></tr>
|
|
<tr class="memdesc:ga82f0637f09eb1082f6fd025f76c2c6f5"><td class="mdescLeft"> </td><td class="mdescRight">Set Cache configuration for a specific function. <a href="#ga82f0637f09eb1082f6fd025f76c2c6f5">More...</a><br/></td></tr>
|
|
<tr class="separator:ga82f0637f09eb1082f6fd025f76c2c6f5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga1bb08f774a34a468d969a8a04791c9bb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga1bb08f774a34a468d969a8a04791c9bb">hipDeviceGetSharedMemConfig</a> (<a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> *pConfig)</td></tr>
|
|
<tr class="memdesc:ga1bb08f774a34a468d969a8a04791c9bb"><td class="mdescLeft"> </td><td class="mdescRight">Returns bank width of shared memory for current device. <a href="#ga1bb08f774a34a468d969a8a04791c9bb">More...</a><br/></td></tr>
|
|
<tr class="separator:ga1bb08f774a34a468d969a8a04791c9bb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga9b1f279084e76691cedfbfadf9c717ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga9b1f279084e76691cedfbfadf9c717ee">hipDeviceSetSharedMemConfig</a> (<a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> config)</td></tr>
|
|
<tr class="memdesc:ga9b1f279084e76691cedfbfadf9c717ee"><td class="mdescLeft"> </td><td class="mdescRight">The bank width of shared memory on current device is set. <a href="#ga9b1f279084e76691cedfbfadf9c717ee">More...</a><br/></td></tr>
|
|
<tr class="separator:ga9b1f279084e76691cedfbfadf9c717ee"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga6e54db382768827e84725632018307aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#ga6e54db382768827e84725632018307aa">hipSetDeviceFlags</a> (unsigned flags)</td></tr>
|
|
<tr class="memdesc:ga6e54db382768827e84725632018307aa"><td class="mdescLeft"> </td><td class="mdescRight">The current device behavior is changed according the flags passed. <a href="#ga6e54db382768827e84725632018307aa">More...</a><br/></td></tr>
|
|
<tr class="separator:ga6e54db382768827e84725632018307aa"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaf1e365e1d17cf40644d1470de4817c8e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Device.html#gaf1e365e1d17cf40644d1470de4817c8e">hipChooseDevice</a> (int *device, const <a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> *prop)</td></tr>
|
|
<tr class="memdesc:gaf1e365e1d17cf40644d1470de4817c8e"><td class="mdescLeft"> </td><td class="mdescRight">Device which matches <a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> is returned. <a href="#gaf1e365e1d17cf40644d1470de4817c8e">More...</a><br/></td></tr>
|
|
<tr class="separator:gaf1e365e1d17cf40644d1470de4817c8e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<h2>----------------------------------------------------------------------------------------------— </h2>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a class="anchor" id="gaf1e365e1d17cf40644d1470de4817c8e"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipChooseDevice </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>device</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> * </td>
|
|
<td class="paramname"><em>prop</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Device which matches <a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> is returned. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">device</td><td>ID </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>properties pointer</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga7080a145a4239a7276e0dc22062026c1"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceGetAttribute </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>pi</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#gacc0acd7b9bda126c6bb3dfd6e2796d7c">hipDeviceAttribute_t</a> </td>
|
|
<td class="paramname"><em>attr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>deviceId</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Query for a specific device attribute. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pi</td><td>pointer to value to return </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">attr</td><td>attribute to query </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deviceId</td><td>which device to query for information</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga37057f9830ad6fab7ce5f05f6d3c89ab"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceGetCacheConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> * </td>
|
|
<td class="paramname"><em>cacheConfig</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set Cache configuration for a specific function. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">cacheConfig</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a> Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaa72baeb520f1d52fe17817e852937218"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceGetLimit </td>
|
|
<td>(</td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"><em>pValue</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">hipLimit_t </td>
|
|
<td class="paramname"><em>limit</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get Resource limits of current device. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pValue</td><td></td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">limit</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, #hipErrorUnsupportedLimit, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a> Note: Currently, only hipLimitMallocHeapSize is available </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga1bb08f774a34a468d969a8a04791c9bb"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceGetSharedMemConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> * </td>
|
|
<td class="paramname"><em>pConfig</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns bank width of shared memory for current device. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">pConfig</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a></dd></dl>
|
|
<p>Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga8d57161ae56a8edc46eeda447417bf6c"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceReset </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The state of current device is discarded and updated to a fresh state. </p>
|
|
<p>Calling this function deletes all streams created, memory allocated, kernels running, events created. Make sure that no other thread is using the device or streams, memory, kernels, events associated with the current device.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a></dd></dl>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd" title="Waits on all active streams on current device. ">hipDeviceSynchronize</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaada3d30a46ae06f68cf1574f496b86ee"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceSetCacheConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> </td>
|
|
<td class="paramname"><em>cacheConfig</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set L1/Shared cache partition. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">cacheConfig</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a> Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga9b1f279084e76691cedfbfadf9c717ee"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceSetSharedMemConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> </td>
|
|
<td class="paramname"><em>config</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The bank width of shared memory on current device is set. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">config</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a></dd></dl>
|
|
<p>Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="gaefdc2847fb1d6c3fb1354e827a191ebd"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipDeviceSynchronize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Waits on all active streams on current device. </p>
|
|
<p>When this command is invoked, the host thread gets blocked until all the commands associated with streams associated with the device. HIP does not support multiple blocking modes (yet!).</p>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a></dd></dl>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#ga43c1e7f15925eeb762195ccb5e063eae" title="Set default device to be used for subsequent hip API calls from this thread. ">hipSetDevice</a>, <a class="el" href="group__Device.html#ga8d57161ae56a8edc46eeda447417bf6c" title="The state of current device is discarded and updated to a fresh state. ">hipDeviceReset</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga82f0637f09eb1082f6fd025f76c2c6f5"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipFuncSetCacheConfig </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga86e5c5692645963a9a673e1aa88ba6ca">hipFuncCache_t</a> </td>
|
|
<td class="paramname"><em>config</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set Cache configuration for a specific function. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">config;</td><td></td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a> Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga7e0e2e8c5f78e3c7449764657c254e0a"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipGetDevice </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>deviceId</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return the default device id for the calling host thread. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">device</td><td>*device is written with the default device</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>HIP maintains an default device for each thread using thread-local-storage. This device is used implicitly for HIP runtime APIs called by this thread. hipGetDevice returns in * <code>device</code> the default device for the calling host thread.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a></dd></dl>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#ga43c1e7f15925eeb762195ccb5e063eae" title="Set default device to be used for subsequent hip API calls from this thread. ">hipSetDevice</a>, hipGetDevicesizeBytes </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga8555d5c76d88c50ddbf54ae70b568394"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipGetDeviceCount </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>count</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Return number of compute-capable devices. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">[output]</td><td>count Returns number of compute-capable devices.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594ad4406972c318df36d231310a15131c24" title="Call to hipGetDeviceCount returned 0 devices. ">hipErrorNoDevice</a></dd></dl>
|
|
<p>Returns in <code>*count</code> the number of devices that have ability to run compute commands. If there are no such devices, then <a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394">hipGetDeviceCount</a> will return <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594ad4406972c318df36d231310a15131c24" title="Call to hipGetDeviceCount returned 0 devices. ">hipErrorNoDevice</a>. If 1 or more devices can be found, then hipGetDeviceCount returns <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga32208513b7cd491f0cb5fc884053f790"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipGetDeviceProperties </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> * </td>
|
|
<td class="paramname"><em>prop</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>deviceId</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns device properties. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">prop</td><td>written with device properties </td></tr>
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deviceId</td><td>which device to query for information</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a> </dd></dl>
|
|
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd><p class="startdd">HCC always returns 0 for maxThreadsPerMultiProcessor </p>
|
|
<p>HCC always returns 0 for regsPerBlock </p>
|
|
<p class="enddd">HCC always returns 0 for l2CacheSize</p>
|
|
</dd></dl>
|
|
<p>Populates hipGetDeviceProperties with information for the specified device. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga43c1e7f15925eeb762195ccb5e063eae"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipSetDevice </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>deviceId</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set default device to be used for subsequent hip API calls from this thread. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">deviceId</td><td>Valid device in range 0...<a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount()</a>.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>Sets <code>device</code> as the default device for the calling host thread. Valid device id's are 0... (<a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount()</a>-1).</p>
|
|
<p>Many HIP APIs implicitly use the "default device" :</p>
|
|
<ul>
|
|
<li>Any device memory subsequently allocated from this host thread (using hipMalloc) will be allocated on device.</li>
|
|
<li>Any streams or events created from this host thread will be associated with device.</li>
|
|
<li>Any kernels launched from this host thread (using hipLaunchKernel) will be executed on device (unless a specific stream is specified, in which case the device associated with that stream will be used).</li>
|
|
</ul>
|
|
<p>This function may be called from any host thread. Multiple host threads may use the same device. This function does no synchronization with the previous or new device, and has very little runtime overhead. Applications can use hipSetDevice to quickly switch the default device before making a HIP runtime call which uses the default device.</p>
|
|
<p>The default device is stored in thread-local-storage for each thread. Thread-pool implementations may inherit the default device of the previous thread. A good practice is to always call hipSetDevice at the start of HIP coding sequency to establish a known standard device.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a>, #hipErrorDeviceAlreadyInUse</dd></dl>
|
|
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#ga7e0e2e8c5f78e3c7449764657c254e0a" title="Return the default device id for the calling host thread. ">hipGetDevice</a>, <a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount</a> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ga6e54db382768827e84725632018307aa"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipSetDeviceFlags </td>
|
|
<td>(</td>
|
|
<td class="paramtype">unsigned </td>
|
|
<td class="paramname"><em>flags</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The current device behavior is changed according the flags passed. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>The schedule flags impact how HIP waits for the completion of a command running on a device. hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the work until the command completes. This offers the lowest latency, but will consume a CPU core and may increase power. hipDeviceScheduleYield : The HIP runtime will yield the CPU to system so that other tasks can use it. This may increase latency to detect the completion but will consume less power and is friendlier to other tasks in the system. hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield. hipDeviceScheduleAuto : Use a hueristic to select between Spin and Yield modes. If the number of HIP contexts is greater than the number of logical processors in the system, use Spin scheduling. Else use Yield scheduling.</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<p>hipDeviceMapHost : Allow mapping host memory. On ROCM, this is always allowed and the flag is ignored. hipDeviceLmemResizeToMax : </p>
|
|
<dl class="section warning"><dt>Warning</dt><dd>ROCm silently ignores this flag.</dd></dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a>, #hipErrorSetOnActiveProcess </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Mon Dec 19 2016 04:03:43 for HIP: Heterogenous-computing Interface for Portability by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|