Disable device side malloc (#2009)

* Disable device side malloc

Currently device side malloc is not working and takes excessive
device memory.

Disable it for now until a working malloc is implemented.

Change-Id: I1ad908c1c53a83752383b4be96688a848642c699
Tento commit je obsažen v:
Yaxun (Sam) Liu
2020-04-14 06:37:14 -04:00
odevzdal GitHub
rodič 7daa8c6c3b
revize 8d83e95457
5 změnil soubory, kde provedl 19 přidání a 6 odebrání
+3 -2
Zobrazit soubor
@@ -96,12 +96,13 @@ hipError_t hipDeviceGetLimit(size_t* pValue, hipLimit_t limit) {
if (pValue == nullptr) {
return ihipLogStatus(hipErrorInvalidValue);
}
#if __HIP_ENABLE_DEVICE_MALLOC__
if (limit == hipLimitMallocHeapSize) {
*pValue = (size_t)__HIP_SIZE_OF_HEAP;
return ihipLogStatus(hipSuccess);
} else {
return ihipLogStatus(hipErrorUnsupportedLimit);
}
#endif
return ihipLogStatus(hipErrorUnsupportedLimit);
}
hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t cacheConfig) {
+3
Zobrazit soubor
@@ -19,6 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <hc_am.hpp>
#include "hsa/hsa.h"
#include "hsa/hsa_ext_amd.h"
@@ -30,8 +31,10 @@ THE SOFTWARE.
#include <functional>
#include <fstream>
#if __HIP_ENABLE_DEVICE_MALLOC__
__device__ char __hip_device_heap[__HIP_SIZE_OF_HEAP];
__device__ uint32_t __hip_device_page_flag[__HIP_NUM_PAGES];
#endif
// Internal HIP APIS:
namespace hip_internal {