/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_arithmetic_operations.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_arithmetic_operations.h Source File#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/projects/rpp/api/rppt_tensor_arithmetic_operations.h Source File
rppt_tensor_arithmetic_operations.h
Go to the documentation of this file.
1 /*
2 MIT License
3 
4 Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc.
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef RPPT_TENSOR_ARITHMETIC_OPERATIONS_H
26 #define RPPT_TENSOR_ARITHMETIC_OPERATIONS_H
27 
28 #include "rpp.h"
29 #include "rppdefs.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
66  RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr,
67  Rpp32f* mulTensor, Rpp32f* addTensor,
68  RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType,
69  rppHandle_t rppHandle, RppBackend executionBackend);
70 
88 RppStatus rppt_add_scalar(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr,
89  RpptGenericDescPtr dstGenericDescPtr, Rpp32f* addTensor,
90  RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType,
91  rppHandle_t rppHandle, RppBackend executionBackend);
92 
111  RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr,
112  Rpp32f* subtractTensor, RpptROI3DPtr roiGenericPtrSrc,
113  RpptRoi3DType roiType, rppHandle_t rppHandle,
114  RppBackend executionBackend);
115 
134  RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr,
135  Rpp32f* mulTensor, RpptROI3DPtr roiGenericPtrSrc,
136  RpptRoi3DType roiType, rppHandle_t rppHandle,
137  RppBackend executionBackend);
138 
161 RppStatus rppt_magnitude(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr,
162  RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc,
163  RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend);
164 
179 RppStatus rppt_log(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr,
180  RpptGenericDescPtr dstGenericDescPtr, Rpp32u* roiTensor, rppHandle_t rppHandle,
181  RppBackend executionBackend);
182 
197 RppStatus rppt_log1p(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr,
198  RpptGenericDescPtr dstGenericDescPtr, Rpp32u* roiTensor, rppHandle_t rppHandle,
199  RppBackend executionBackend);
200 
220  RpptGenericDescPtr srcGenericDescPtr1,
221  RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr,
222  RpptGenericDescPtr dstGenericDescPtr,
223  RpptBroadcastMode broadcastMode, Rpp32u* roiTensor1,
224  Rpp32u* roiTensor2, rppHandle_t rppHandle,
225  RppBackend executionBackend);
226 
246  RpptGenericDescPtr srcGenericDescPtr1,
247  RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr,
248  RpptGenericDescPtr dstGenericDescPtr,
249  RpptBroadcastMode broadcastMode, Rpp32u* roiTensor1,
250  Rpp32u* roiTensor2, rppHandle_t rppHandle,
251  RppBackend executionBackend);
252 
272  RpptGenericDescPtr srcGenericDescPtr1,
273  RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr,
274  RpptGenericDescPtr dstGenericDescPtr,
275  RpptBroadcastMode broadcastMode, Rpp32u* roiTensor1,
276  Rpp32u* roiTensor2, rppHandle_t rppHandle,
277  RppBackend executionBackend);
278 
298  RpptGenericDescPtr srcGenericDescPtr1,
299  RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr,
300  RpptGenericDescPtr dstGenericDescPtr,
301  RpptBroadcastMode broadcastMode, Rpp32u* roiTensor1,
302  Rpp32u* roiTensor2, rppHandle_t rppHandle,
303  RppBackend executionBackend);
304 
308 #ifdef __cplusplus
309 }
310 #endif
311 #endif // RPPT_TENSOR_ARITHMETIC_OPERATIONS_H
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:147
void * RppPtr_t
void pointer
Definition: rppdefs.h:159
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:460
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:166
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:468
float Rpp32f
32 bit float
Definition: rppdefs.h:155
RppBackend
RPP RppBackend type enums.
Definition: rppdefs.h:331
RppStatus rppt_add_scalar(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32f *addTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Add scalar augmentation on HIP/HOST backend.
RppStatus rppt_subtract_scalar(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32f *subtractTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Subtract scalar augmentation on HIP/HOST backend.
RppStatus rppt_tensor_subtract_tensor(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcGenericDescPtr1, RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptBroadcastMode broadcastMode, Rpp32u *roiTensor1, Rpp32u *roiTensor2, rppHandle_t rppHandle, RppBackend executionBackend)
Tensor Subtract Tensor operation on HIP/HOST backend with tensor broadcasting support.
RppStatus rppt_tensor_multiply_tensor(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcGenericDescPtr1, RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptBroadcastMode broadcastMode, Rpp32u *roiTensor1, Rpp32u *roiTensor2, rppHandle_t rppHandle, RppBackend executionBackend)
Tensor Multiply Tensor operation on HIP/HOST backend with tensor broadcasting support.
RppStatus rppt_tensor_divide_tensor(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcGenericDescPtr1, RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptBroadcastMode broadcastMode, Rpp32u *roiTensor1, Rpp32u *roiTensor2, rppHandle_t rppHandle, RppBackend executionBackend)
Tensor Divide Tensor operation on HIP/HOST backend with tensor broadcasting support.
RppStatus rppt_log1p(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Log1p operation on HIP/HOST backend.
RppStatus rppt_fused_multiply_add_scalar(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32f *mulTensor, Rpp32f *addTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Fused multiply add scalar augmentation on HIP/HOST backend.
RppStatus rppt_tensor_add_tensor(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcGenericDescPtr1, RpptGenericDescPtr srcGenericDescPtr2, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, RpptBroadcastMode broadcastMode, Rpp32u *roiTensor1, Rpp32u *roiTensor2, rppHandle_t rppHandle, RppBackend executionBackend)
Tensor Add Tensor operation on HIP/HOST backend with tensor broadcasting support.
RppStatus rppt_multiply_scalar(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32f *mulTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Multiply scalar augmentation on HIP/HOST backend.
RppStatus rppt_magnitude(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)
Magnitude computation on HIP/HOST backend for a NCHW/NHWC layout tensor.
RppStatus rppt_log(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)
Logarithm operation on HIP/HOST backend.
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RpptBroadcastMode
Broadcast support mode for RPP Tensor operations.
Definition: rppdefs.h:370
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:609
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:650
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:590
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:581