SWDEV-249487-remove two HCC related APIs
Change-Id: Icf90ece0808643e0c5f0cc00b6644d5171b553d8
[ROCm/hip commit: c2a3d19acb]
Cette révision appartient à :
@@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @defgroup HipDb HCC-specific debug facilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief * Print memory tracker information for this pointer.
|
||||
*
|
||||
* HIP maintains a table for all memory allocations performed by the application.
|
||||
* If targetAddress is 0, the entire table is printed to stderr.
|
||||
* If targetAddress is non-null, this routine will perform some forensic analysis
|
||||
* to find the pointer
|
||||
*/
|
||||
void hipdbPrintMem(void* targetAddress);
|
||||
|
||||
|
||||
// doxygen end HipDb
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -1019,7 +1019,7 @@ hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback
|
||||
* #hipEventDisableTiming : Disable recording of timing information. On ROCM platform, timing
|
||||
information is always recorded and this flag has no performance benefit.
|
||||
|
||||
* @warning On HCC platform, hipEventInterprocess support is under development. Use of this flag
|
||||
* @warning On AMD platform, hipEventInterprocess support is under development. Use of this flag
|
||||
will return an error.
|
||||
*
|
||||
* @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,
|
||||
@@ -1104,7 +1104,7 @@ hipError_t hipEventDestroy(hipEvent_t event);
|
||||
*
|
||||
* If hipEventRecord() has not been called on @p event, this function returns immediately.
|
||||
*
|
||||
* TODO-hcc - This function needs to support hipEventBlockingSync parameter.
|
||||
* TODO-hip- This function needs to support hipEventBlockingSync parameter.
|
||||
*
|
||||
* @param[in] event Event on which to wait.
|
||||
* @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized,
|
||||
@@ -4256,29 +4256,6 @@ static inline hipError_t hipUnbindTexture(
|
||||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
||||
/**
|
||||
*-------------------------------------------------------------------------------------------------
|
||||
*-------------------------------------------------------------------------------------------------
|
||||
* @defgroup HCC_Specific HCC-Specific Accessors
|
||||
* @{
|
||||
*
|
||||
* The following calls are only supported when compiler HIP with HCC.
|
||||
* To produce portable code, use of these calls must be guarded #ifdef checks:
|
||||
* @code
|
||||
* #ifdef __HCC__
|
||||
* hc::accelerator acc;
|
||||
hipError_t err = hipHccGetAccelerator(deviceId, &acc)
|
||||
* #endif
|
||||
* @endcode
|
||||
*
|
||||
*/
|
||||
|
||||
// end-group HCC_Specific
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
// doxygen end HIP API
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -27,42 +27,6 @@ THE SOFTWARE.
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#endif
|
||||
#ifdef __HCC__
|
||||
|
||||
// Forward declarations:
|
||||
namespace hc {
|
||||
class accelerator;
|
||||
class accelerator_view;
|
||||
}; // namespace hc
|
||||
|
||||
|
||||
/**
|
||||
*-------------------------------------------------------------------------------------------------
|
||||
*-------------------------------------------------------------------------------------------------
|
||||
* @defgroup HCC-specific features
|
||||
* @warning These APIs provide access to special features of HCC compiler and are not available
|
||||
*through the CUDA path.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Return hc::accelerator associated with the specified deviceId
|
||||
* @return #hipSuccess, #hipErrorInvalidDevice
|
||||
*/
|
||||
HIP_PUBLIC_API
|
||||
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator* acc);
|
||||
|
||||
/**
|
||||
* @brief Return hc::accelerator_view associated with the specified stream
|
||||
*
|
||||
* If stream is 0, the accelerator_view for the default stream is returned.
|
||||
* @return #hipSuccess
|
||||
*/
|
||||
HIP_PUBLIC_API
|
||||
hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** av);
|
||||
|
||||
#endif // #ifdef __HCC__
|
||||
|
||||
/**
|
||||
* @brief launches kernel f with launch parameters and shared memory on stream with arguments passed
|
||||
|
||||
@@ -229,19 +229,3 @@ hipError_t hipGetDeviceProperties ( hipDeviceProp_t* props, hipDevice_t device )
|
||||
*props = deviceProps;
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator* acc) {
|
||||
HIP_INIT_API(hipHccGetAccelerator, deviceId, acc);
|
||||
|
||||
assert(0 && "Unimplemented");
|
||||
|
||||
HIP_RETURN(hipErrorNotSupported);
|
||||
}
|
||||
|
||||
hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** av) {
|
||||
HIP_INIT_API(hipHccGetAcceleratorView, stream, av);
|
||||
|
||||
assert(0 && "Unimplemented");
|
||||
|
||||
HIP_RETURN(hipErrorNotSupported);
|
||||
}
|
||||
|
||||
@@ -229,8 +229,6 @@ hipTexRefSetMipmapLevelClamp
|
||||
hipTexRefSetMipmappedArray
|
||||
hipProfilerStart
|
||||
hipProfilerStop
|
||||
hipHccGetAccelerator
|
||||
hipHccGetAcceleratorView
|
||||
hipCreateSurfaceObject
|
||||
hipDestroySurfaceObject
|
||||
hipInitActivityCallback
|
||||
|
||||
@@ -260,8 +260,6 @@ global:
|
||||
extern "C++" {
|
||||
hip_impl::hipLaunchKernelGGLImpl*;
|
||||
hip_impl::demangle*;
|
||||
hipHccGetAccelerator*;
|
||||
hipHccGetAcceleratorView*;
|
||||
hipCreateSurfaceObject*;
|
||||
hipDestroySurfaceObject*;
|
||||
hipHccModuleLaunchKernel*;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
#include <hc_am.hpp>
|
||||
|
||||
|
||||
void hipdbPrintMem(void* targetAddress) { hc::am_memtracker_print(targetAddress); };
|
||||
@@ -2504,41 +2504,6 @@ hipError_t hipProfilerStop() {
|
||||
return ihipLogStatus(hipSuccess);
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// HCC-specific accessor functions:
|
||||
|
||||
//---
|
||||
hipError_t hipHccGetAccelerator(int deviceId, hc::accelerator* acc) {
|
||||
HIP_INIT_API(hipHccGetAccelerator, deviceId, acc);
|
||||
|
||||
const ihipDevice_t* device = ihipGetDevice(deviceId);
|
||||
hipError_t err;
|
||||
if (device == NULL) {
|
||||
err = hipErrorInvalidDevice;
|
||||
} else {
|
||||
*acc = device->_acc;
|
||||
err = hipSuccess;
|
||||
}
|
||||
return ihipLogStatus(err);
|
||||
}
|
||||
|
||||
|
||||
//---
|
||||
hipError_t hipHccGetAcceleratorView(hipStream_t stream, hc::accelerator_view** av) {
|
||||
HIP_INIT_API(hipHccGetAcceleratorView, stream, av);
|
||||
|
||||
if (stream == hipStreamNull) {
|
||||
ihipCtx_t* device = ihipGetTlsDefaultCtx();
|
||||
stream = device->_defaultStream;
|
||||
}
|
||||
|
||||
*av = stream->locked_getAv(); // TODO - review.
|
||||
|
||||
hipError_t err = hipSuccess;
|
||||
return ihipLogStatus(err);
|
||||
}
|
||||
|
||||
//// TODO - add identifier numbers for streams and devices to help with debugging.
|
||||
// TODO - add a contect sequence number for debug. Print operator<< ctx:0.1 (device.ctx)
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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.
|
||||
*/
|
||||
// Test the HCC-specific API extensions for HIP:
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s EXCLUDE_HIP_PLATFORM nvcc
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM all
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_ext.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#define CHECK(error) \
|
||||
if (error != hipSuccess) { \
|
||||
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error, __FILE__, \
|
||||
__LINE__); \
|
||||
exit(EXIT_FAILURE); \
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
int deviceId;
|
||||
CHECK(hipGetDevice(&deviceId));
|
||||
hipDeviceProp_t props;
|
||||
CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
printf("info: running on device #%d %s\n", deviceId, props.name);
|
||||
|
||||
#ifdef __HCC__
|
||||
hc::accelerator acc;
|
||||
CHECK(hipHccGetAccelerator(deviceId, &acc));
|
||||
std::wcout << "device_path=" << acc.get_device_path() << "\n";
|
||||
|
||||
hc::accelerator_view* av;
|
||||
CHECK(hipHccGetAcceleratorView(0 /*nullStream*/, &av));
|
||||
#endif
|
||||
|
||||
|
||||
passed();
|
||||
};
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur