Rename hip/hip_hcc.h to hip/hip_ext.h (#1341)
* Rename hip/hip_hcc.h to hip/hip_ext.h * Deprecate hip_hcc.h
This commit is contained in:
committed by
Maneesh Gupta
parent
2fa45c215a
commit
579a4f36fa
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
|
|
||||||
#include "hc.hpp"
|
#include "hc.hpp"
|
||||||
#include "hip/hip_hcc.h"
|
#include "hip/hip_ext.h"
|
||||||
#include "hip_runtime.h"
|
#include "hip_runtime.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -795,4 +795,4 @@ requires(Domain<K> == {Ts...}) inline std::enable_if_t<
|
|||||||
hipLaunchKernelGGL(kernel_name, num_blocks, dim_blocks, group_mem_bytes, stream, \
|
hipLaunchKernelGGL(kernel_name, num_blocks, dim_blocks, group_mem_bytes, stream, \
|
||||||
hipLaunchParm{}, ##__VA_ARGS__); \
|
hipLaunchParm{}, ##__VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
} // namespace hip_impl
|
} // namespace hip_impl
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2015 - present 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HIP_INCLUDE_HIP_HIP_EXT_H
|
||||||
|
#define HIP_INCLUDE_HIP_HIP_EXT_H
|
||||||
|
#include "hip/hip_runtime_api.h"
|
||||||
|
#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
|
||||||
|
to kernelparams or extra
|
||||||
|
*
|
||||||
|
* @param [in[ f Kernel to launch.
|
||||||
|
* @param [in] gridDimX X grid dimension specified in work-items
|
||||||
|
* @param [in] gridDimY Y grid dimension specified in work-items
|
||||||
|
* @param [in] gridDimZ Z grid dimension specified in work-items
|
||||||
|
* @param [in] blockDimX X block dimensions specified in work-items
|
||||||
|
* @param [in] blockDimY Y grid dimension specified in work-items
|
||||||
|
* @param [in] blockDimZ Z grid dimension specified in work-items
|
||||||
|
* @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The
|
||||||
|
kernel can access this with HIP_DYNAMIC_SHARED.
|
||||||
|
* @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th
|
||||||
|
default stream is used with associated synchronization rules.
|
||||||
|
* @param [in] kernelParams
|
||||||
|
* @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and
|
||||||
|
must be in the memory layout and alignment expected by the kernel.
|
||||||
|
* @param [in] startEvent If non-null, specified event will be updated to track the start time of
|
||||||
|
the kernel launch. The event must be created before calling this API.
|
||||||
|
* @param [in] stopEvent If non-null, specified event will be updated to track the stop time of
|
||||||
|
the kernel launch. The event must be created before calling this API.
|
||||||
|
*
|
||||||
|
* @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue
|
||||||
|
*
|
||||||
|
* @warning kernellParams argument is not yet implemented in HIP. Please use extra instead. Please
|
||||||
|
refer to hip_porting_driver_api.md for sample usage.
|
||||||
|
|
||||||
|
* HIP/ROCm actually updates the start event when the associated kernel completes.
|
||||||
|
*/
|
||||||
|
HIP_PUBLIC_API
|
||||||
|
hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
||||||
|
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
||||||
|
uint32_t localWorkSizeX, uint32_t localWorkSizeY,
|
||||||
|
uint32_t localWorkSizeZ, size_t sharedMemBytes,
|
||||||
|
hipStream_t hStream, void** kernelParams, void** extra,
|
||||||
|
hipEvent_t startEvent = nullptr,
|
||||||
|
hipEvent_t stopEvent = nullptr,
|
||||||
|
uint32_t flags = 0);
|
||||||
|
|
||||||
|
HIP_PUBLIC_API
|
||||||
|
hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
||||||
|
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
||||||
|
uint32_t localWorkSizeX, uint32_t localWorkSizeY,
|
||||||
|
uint32_t localWorkSizeZ, size_t sharedMemBytes,
|
||||||
|
hipStream_t hStream, void** kernelParams, void** extra,
|
||||||
|
hipEvent_t startEvent = nullptr,
|
||||||
|
hipEvent_t stopEvent = nullptr)
|
||||||
|
__attribute__((deprecated("use hipExtModuleLaunchKernel instead")));
|
||||||
|
|
||||||
|
// doxygen end AMD-specific features
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
#endif // #ifdef HIP_INCLUDE_HIP_HIP_EXT_H
|
||||||
+2
-97
@@ -1,16 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
|
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
@@ -22,98 +19,6 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#ifndef HIP_INCLUDE_HIP_HIP_HCC_H
|
#ifndef HIP_INCLUDE_HIP_HIP_HCC_H
|
||||||
#define HIP_INCLUDE_HIP_HIP_HCC_H
|
#define HIP_INCLUDE_HIP_HIP_HCC_H
|
||||||
|
#warning "hip/hip_hcc.h is deprecated, please use hip/hip_ext.h"
|
||||||
#ifdef __HCC__
|
#include "hip/hip_ext.h"
|
||||||
|
|
||||||
#include "hip/hip_runtime_api.h"
|
|
||||||
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief launches kernel f with launch parameters and shared memory on stream with arguments passed
|
|
||||||
to kernelparams or extra
|
|
||||||
*
|
|
||||||
* @param [in[ f Kernel to launch.
|
|
||||||
* @param [in] gridDimX X grid dimension specified in work-items
|
|
||||||
* @param [in] gridDimY Y grid dimension specified in work-items
|
|
||||||
* @param [in] gridDimZ Z grid dimension specified in work-items
|
|
||||||
* @param [in] blockDimX X block dimensions specified in work-items
|
|
||||||
* @param [in] blockDimY Y grid dimension specified in work-items
|
|
||||||
* @param [in] blockDimZ Z grid dimension specified in work-items
|
|
||||||
* @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The
|
|
||||||
kernel can access this with HIP_DYNAMIC_SHARED.
|
|
||||||
* @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th
|
|
||||||
default stream is used with associated synchronization rules.
|
|
||||||
* @param [in] kernelParams
|
|
||||||
* @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and
|
|
||||||
must be in the memory layout and alignment expected by the kernel.
|
|
||||||
* @param [in] startEvent If non-null, specified event will be updated to track the start time of
|
|
||||||
the kernel launch. The event must be created before calling this API.
|
|
||||||
* @param [in] stopEvent If non-null, specified event will be updated to track the stop time of
|
|
||||||
the kernel launch. The event must be created before calling this API.
|
|
||||||
*
|
|
||||||
* @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue
|
|
||||||
*
|
|
||||||
* @warning kernellParams argument is not yet implemented in HIP. Please use extra instead. Please
|
|
||||||
refer to hip_porting_driver_api.md for sample usage.
|
|
||||||
|
|
||||||
* HIP/ROCm actually updates the start event when the associated kernel completes.
|
|
||||||
*/
|
|
||||||
HIP_PUBLIC_API
|
|
||||||
hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
|
||||||
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
|
||||||
uint32_t localWorkSizeX, uint32_t localWorkSizeY,
|
|
||||||
uint32_t localWorkSizeZ, size_t sharedMemBytes,
|
|
||||||
hipStream_t hStream, void** kernelParams, void** extra,
|
|
||||||
hipEvent_t startEvent = nullptr,
|
|
||||||
hipEvent_t stopEvent = nullptr,
|
|
||||||
uint32_t flags = 0);
|
|
||||||
|
|
||||||
HIP_PUBLIC_API
|
|
||||||
hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX,
|
|
||||||
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
|
|
||||||
uint32_t localWorkSizeX, uint32_t localWorkSizeY,
|
|
||||||
uint32_t localWorkSizeZ, size_t sharedMemBytes,
|
|
||||||
hipStream_t hStream, void** kernelParams, void** extra,
|
|
||||||
hipEvent_t startEvent = nullptr,
|
|
||||||
hipEvent_t stopEvent = nullptr)
|
|
||||||
__attribute__((deprecated("use hipExtModuleLaunchKernel instead")));
|
|
||||||
|
|
||||||
// doxygen end HCC-specific features
|
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
#endif // #ifdef __HCC__
|
|
||||||
#endif // #ifdef HIP_INCLUDE_HIP_HIP_HCC_H
|
#endif // #ifdef HIP_INCLUDE_HIP_HIP_HCC_H
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef __HIP_PLATFORM_HCC__
|
#ifdef __HIP_PLATFORM_HCC__
|
||||||
#include <hip/hip_hcc.h>
|
#include <hip/hip_ext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LEN 64
|
#define LEN 64
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <hip/hip_hcc.h>
|
#include <hip/hip_ext.h>
|
||||||
|
|
||||||
#define LEN 64
|
#define LEN 64
|
||||||
#define SIZE LEN * sizeof(float)
|
#define SIZE LEN * sizeof(float)
|
||||||
|
|||||||
@@ -21,11 +21,9 @@ THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hip/hip_runtime.h"
|
#include "hip/hip_runtime.h"
|
||||||
//#include "hip/hip_runtime_api.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
//#include <hip/hip_hcc.h>
|
|
||||||
|
|
||||||
#define fileName "tex2dKernel.code"
|
#define fileName "tex2dKernel.code"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ THE SOFTWARE.
|
|||||||
#include "hsa/hsa_ext_image.h"
|
#include "hsa/hsa_ext_image.h"
|
||||||
#include "hip/hip_runtime.h"
|
#include "hip/hip_runtime.h"
|
||||||
#include "hip_hcc_internal.h"
|
#include "hip_hcc_internal.h"
|
||||||
#include "hip/hip_hcc.h"
|
#include "hip/hip_ext.h"
|
||||||
#include "trace_helper.h"
|
#include "trace_helper.h"
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||||||
#include "hip/hcc_detail/hsa_helpers.hpp"
|
#include "hip/hcc_detail/hsa_helpers.hpp"
|
||||||
#include "hip/hcc_detail/program_state.hpp"
|
#include "hip/hcc_detail/program_state.hpp"
|
||||||
#include "hip_hcc_internal.h"
|
#include "hip_hcc_internal.h"
|
||||||
#include "hip/hip_hcc.h"
|
#include "hip/hip_ext.h"
|
||||||
#include "program_state.inl"
|
#include "program_state.inl"
|
||||||
#include "trace_helper.h"
|
#include "trace_helper.h"
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "hip/hip_runtime.h"
|
#include "hip/hip_runtime.h"
|
||||||
#include "hip/hip_hcc.h"
|
#include "hip/hip_ext.h"
|
||||||
#include "test_common.h"
|
#include "test_common.h"
|
||||||
|
|
||||||
#define CHECK(error) \
|
#define CHECK(error) \
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ THE SOFTWARE.
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <hip/hip_hcc.h>
|
#include <hip/hip_ext.h>
|
||||||
|
|
||||||
#define LEN 64
|
#define LEN 64
|
||||||
#define SIZE LEN * sizeof(float)
|
#define SIZE LEN * sizeof(float)
|
||||||
|
|||||||
@@ -27,11 +27,9 @@ THE SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hip/hip_runtime.h"
|
#include "hip/hip_runtime.h"
|
||||||
//#include "hip/hip_runtime_api.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
//#include <hip/hip_hcc.h>
|
|
||||||
|
|
||||||
#define fileName "tex2d_kernel.code"
|
#define fileName "tex2d_kernel.code"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user