projects/rpp/api/rppdefs.h Source File

projects/rpp/api/rppdefs.h Source File#

RPP: projects/rpp/api/rppdefs.h Source File
rppdefs.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 RPPDEFS_H
26 #define RPPDEFS_H
27 
34 #include <stddef.h>
35 
36 #include <cmath>
37 #if RPP_BACKEND_HIP
38 #include <hip/hip_fp16.h>
39 #endif // RPP_BACKEND_HIP
40 #if __has_include(<half/half.hpp>)
41 #include <half/half.hpp>
42 #else
43 #include <half.hpp>
44 #endif
45 using halfhpp = half_float::half;
46 typedef halfhpp Rpp16f;
47 
48 #if _WIN32
49 #include <intrin.h>
50 #else
51 #include <immintrin.h>
52 #include <smmintrin.h>
53 #include <x86intrin.h>
54 #endif
55 #include <vector>
56 
58 #define RPP_MIN_8U (0)
60 #define RPP_MAX_8U (255)
62 #define RPPT_MAX_DIMS (5)
65 #define RPPT_MAX_DIMS_SAMPLE (4)
67 #define RPPT_MAX_AUDIO_CHANNELS (16)
68 
69 #if RPP_BACKEND_HIP
70 #include <hip/hip_runtime.h>
71 #define RPP_HOST_DEVICE __host__ __device__
72 
75 #define RPP_HIP_RETURN_IF_ERROR(expr) \
76  do { \
77  hipError_t _rpp_hip_err = (expr); \
78  if (_rpp_hip_err != hipSuccess) { \
79  fprintf(stderr, "HIP runtime error: %s returned %d at %s:%d", #expr, _rpp_hip_err, \
80  __FILE__, __LINE__); \
81  return RPP_ERROR_HIP_RUNTIME; \
82  } \
83  } while (0)
84 
87 #define HIP_CHECK_LAUNCH_RETURN() \
88  do { \
89  hipError_t status = hipGetLastError(); \
90  if (status != hipSuccess) { \
91  fprintf(stderr, "HIP kernel launch error: returned %d at %s:%d", status, __FILE__, \
92  __LINE__); \
93  return RPP_ERROR_HIP_LAUNCH; \
94  } \
95  } while (0)
96 #else
97 #define RPP_HOST_DEVICE
98 #endif
99 
100 const float ONE_OVER_6 = 1.0f / 6;
101 const float ONE_OVER_3 = 1.0f / 3;
102 const float TWO_OVER_3 = 2.0f / 3;
103 const float ONE_OVER_255 = 1.0f / 255;
104 const uint MMS_MAX_SCRATCH_MEMORY = 115293120; // maximum scratch memory size (in number of floats)
105  // needed for MMS buffer in RNNT training
106 const uint SPECTROGRAM_MAX_SCRATCH_MEMORY =
107  372877312; // maximum scratch memory size (in number of floats) needed for spectrogram HIP
108  // kernel in RNNT training
109 #define DROPOUT_FIXED_SEED 42 // Constant fixed seed for reproducing the dropout output
110 #define RANDOM_ERASE_NOISE_BUFFER_SIDE \
111  255 // Random erase spatial noise buffer height and width. Changing this constant will result
112  // in QA test failures for tiled noise mapping
113 
114 /******************** RPP typedefs ********************/
115 
117 typedef unsigned char Rpp8u;
119 typedef signed char Rpp8s;
121 typedef unsigned short Rpp16u;
123 typedef short Rpp16s;
125 typedef unsigned int Rpp32u;
127 typedef int Rpp32s;
129 typedef unsigned long long Rpp64u;
131 typedef long long Rpp64s;
133 typedef float Rpp32f;
135 typedef double Rpp64f;
137 typedef void* RppPtr_t;
139 typedef size_t RppSize_t;
140 
144 typedef enum {
148  RPP_ERROR = -1,
226 } RppStatus;
227 
231 typedef enum { RPP_HOST_BACKEND, RPP_HIP_BACKEND } RppBackend;
232 
236 typedef enum {
237  rppStatusSuccess = 0,
238  rppStatusBadParm = -1,
239  rppStatusUnknownError = -2,
240  rppStatusNotInitialized = -3,
241  rppStatusInvalidValue = -4,
242  rppStatusAllocFailed = -5,
243  rppStatusInternalError = -6,
244  rppStatusNotImplemented = -7,
245  rppStatusUnsupportedOp = -8,
246 } rppStatus_t;
247 
251 typedef enum {
252  RPP_TENSOR_OP_ADD,
253  RPP_TENSOR_OP_SUBTRACT,
254  RPP_TENSOR_OP_MULTIPLY,
255  RPP_TENSOR_OP_DIVIDE
256 } RpptOp;
257 
261 typedef enum { RPP_TENSOR_OP_AND, RPP_TENSOR_OP_OR, RPP_TENSOR_OP_XOR } RpptBitwiseOp;
262 
270 typedef enum {
271  RPP_BROADCAST_ENABLE,
272  RPP_BROADCAST_DISABLE // Broadcasting is disabled; Requires input tensors to be of the same
273  // shape
275 
279 typedef struct {
280  Rpp32u channelParam;
281  Rpp32u bufferMultiplier;
283 
287 typedef struct {
288  Rpp32f data[6];
289 } Rpp32f6;
290 
294 typedef struct {
295  Rpp32f data[9];
296 } Rpp32f9;
297 
301 typedef struct {
302  Rpp32s data[24];
303 } Rpp32s24;
304 
308 typedef struct {
309  Rpp32f data[24];
310 } Rpp32f24;
311 
312 /******************** RPPT typedefs ********************/
313 
317 typedef enum { U8, F32, F16, I8, I16, U16, I32, U32 } RpptDataType;
318 
322 typedef enum {
323  NCHW, // BatchSize-Channels-Height-Width
324  NHWC, // BatchSize-Height-Width-Channels
325  NCDHW, // BatchSize-Channels-Depth-Height-Width
326  NDHWC, // BatchSize-Depth-Height-Width-Channels
327  NHW, // BatchSize-Height-Width
328  NFT, // BatchSize-Frequency-Time -> Frequency Major used for Spectrogram / MelfilterBank
329  NTF // BatchSize-Time-Frequency -> Time Major used for Spectrogram / MelfilterBank
330 } RpptLayout;
331 
336 typedef enum {
345 
352 typedef enum {
356 
360 typedef enum {
361  LTRB, // Left-Top-Right-Bottom
362  XYWH // X-Y-Width-Height
363 } RpptRoiType;
364 
368 typedef enum {
369  LTFRBB, // Left-Top-Front-Right-Bottom-Back
370  XYZWHD // X-Y-Z-Width-Height-Depth
371 } RpptRoi3DType;
372 
376 typedef enum { RGBtype, BGRtype } RpptSubpixelLayout;
377 
381 typedef enum {
382  NEAREST_NEIGHBOR = 0,
383  BILINEAR,
384  BICUBIC,
385  LANCZOS,
386  GAUSSIAN,
387  TRIANGULAR
389 
393 typedef enum { ZERO = 0, CLAMP, REFLECT } RpptAudioBorderType;
394 
398 typedef enum { TOP_EDGE = 0, BOTTOM_EDGE, LEFT_EDGE, RIGHT_EDGE } RpptImageBorderEdge;
399 
403 typedef enum {
404  REPLICATE = 0, // Similar to Nearest Neighbors Padding
405  CONSTANT, // Unsupported Border Type
406  REFLECT_NO_EDGE // Unsupported Border Type
408 
412 typedef enum {
413  SLANEY = 0, // Follows Slaney’s MATLAB Auditory Modelling Work behavior
414  HTK, // Follows O’Shaughnessy’s book formula, consistent with Hidden Markov Toolkit(HTK), m =
415  // 2595 * log10(1 + (f/700))
417 
421 typedef struct {
422  int x;
423  int y;
424 } RpptPoint2D;
425 
429 typedef struct {
430  int x;
431  int y;
432  int z;
433 } RpptPoint3D;
434 
438 typedef struct {
439  RpptPoint2D lt, rb; // Left-Top point and Right-Bottom point
440 
441 } RpptRoiLtrb;
442 
446 typedef struct {
447  RpptPoint2D r;
448  RpptPoint2D g;
449  RpptPoint2D b;
451 
455 typedef struct {
456  RpptPoint3D ltf, rbb; // Left-Top-Front point and Right-Bottom-Back point
457 
458 } RpptRoiLtfrbb;
459 
463 typedef struct {
464  RpptPoint2D xy;
465  int roiWidth, roiHeight;
466 
467 } RpptRoiXywh;
468 
472 typedef struct {
473  RpptPoint3D xyz;
474  int roiWidth, roiHeight, roiDepth;
475 
476 } RpptRoiXyzwhd;
477 
481 typedef union {
482  RpptRoiLtrb ltrbROI; // ROI defined as Left-Top-Right-Bottom
483  RpptRoiXywh xywhROI; // ROI defined as X-Y-Width-Height
484 
485 } RpptROI, *RpptROIPtr;
486 
490 typedef union {
491  RpptRoiLtfrbb ltfrbbROI; // ROI defined as Left-Top-Front-Right-Bottom-Back
492  RpptRoiXyzwhd xyzwhdROI; // ROI defined as X-Y-Z-Width-Height-Depth
493 
495 
499 typedef struct {
500  Rpp32u nStride;
501  Rpp32u cStride;
502  Rpp32u hStride;
503  Rpp32u wStride;
504 } RpptStrides;
505 
509 struct RpptDesc {
510  RppSize_t numDims = 4;
511  Rpp32u offsetInBytes = 0;
512  RpptDataType dataType;
513  Rpp32u n, c, h, w;
514  RpptStrides strides;
515  RpptLayout layout;
516 
517  RpptDesc() = default;
518 
519  RpptDesc(Rpp32u n, Rpp32u c, Rpp32u h, Rpp32u w, RpptDataType dataType, RpptLayout layout)
520  : dataType(dataType), n(n), c(c), h(h), w(w), layout(layout) {
521  if (layout == NCHW) {
522  strides.nStride = c * h * w;
523  strides.cStride = h * w;
524  strides.hStride = w;
525  strides.wStride = 1;
526  } else if (layout == NHWC) {
527  strides.nStride = h * w * c;
528  strides.hStride = w * c;
529  strides.wStride = c;
530  strides.cStride = 1;
531  }
532  }
533 
534  RpptDesc(Rpp32u n, Rpp32u c, Rpp32u h, Rpp32u w, RpptDataType dataType, RpptLayout layout,
535  Rpp32u offsetInBytes, RpptStrides strides)
536  : offsetInBytes(offsetInBytes),
537  dataType(dataType),
538  n(n),
539  c(c),
540  h(h),
541  w(w),
542  strides(strides),
543  layout(layout) {}
544 };
545 typedef RpptDesc* RpptDescPtr;
546 
550 typedef struct {
551  RppSize_t numDims;
552  Rpp32u offsetInBytes;
553  RpptDataType dataType;
554  Rpp32u dims[RPPT_MAX_DIMS];
555  Rpp32u strides[RPPT_MAX_DIMS];
556  RpptLayout layout;
558 
562 typedef struct {
563  Rpp8u R;
564  Rpp8u G;
565  Rpp8u B;
566 } RpptRGB;
567 
571 typedef struct {
572  Rpp32f R;
573  Rpp32f G;
574  Rpp32f B;
575 } RpptFloatRGB;
576 
580 typedef struct {
581  Rpp32u x;
582  Rpp32u y;
584 
588 typedef struct {
589  Rpp32f x;
590  Rpp32f y;
592 
596 typedef struct {
597  Rpp32u width;
598  Rpp32u height;
600 
604 typedef struct {
605  Rpp32u x[5];
606  Rpp32u counter;
608 
612 typedef struct {
613  Rpp32s x[5];
614  Rpp32s counter;
615  int boxMullerFlag;
616  float boxMullerExtra;
618 
622 typedef struct {
623  Rpp32s24 srcLocsTL;
624  Rpp32s24 srcLocsTR;
625  Rpp32s24 srcLocsBL;
626  Rpp32s24 srcLocsBR;
628 
632 typedef struct {
633  Rpp32f24 srcValsTL;
634  Rpp32f24 srcValsTR;
635  Rpp32f24 srcValsBL;
636  Rpp32f24 srcValsBR;
638 
642 typedef struct GenericFilter {
643  Rpp32f scale = 1.0f;
644  Rpp32f radius = 1.0f;
645  Rpp32s size;
646  GenericFilter(RpptInterpolationType interpolationType, Rpp32s in_size, Rpp32s out_size,
647  Rpp32f scaleRatio) {
648  switch (interpolationType) {
649  case RpptInterpolationType::BICUBIC: {
650  this->radius = 2.0f;
651  break;
652  }
653  case RpptInterpolationType::LANCZOS: {
654  if (in_size > out_size) {
655  this->radius = 3.0f * scaleRatio;
656  this->scale = (1 / scaleRatio);
657  } else
658  this->radius = 3.0f;
659  break;
660  }
661  case RpptInterpolationType::GAUSSIAN: {
662  if (in_size > out_size) {
663  this->radius = scaleRatio;
664  this->scale = (1 / scaleRatio);
665  }
666  break;
667  }
668  case RpptInterpolationType::TRIANGULAR: {
669  if (in_size > out_size) {
670  this->radius = scaleRatio;
671  this->scale = (1 / scaleRatio);
672  }
673  break;
674  }
675  default: {
676  this->radius = 1.0f;
677  this->scale = 1.0f;
678  break;
679  }
680  }
681  this->size = std::ceil(2 * this->radius);
682  }
684 
688 typedef struct RpptResamplingWindow {
689  inline RPP_HOST_DEVICE void input_range(Rpp32f x, Rpp32s* loc0, Rpp32s* loc1) {
690  Rpp32s xc = std::ceil(x);
691  *loc0 = xc - lobes;
692  *loc1 = xc + lobes;
693  }
694 
695  inline Rpp32f operator()(Rpp32f x) {
696  Rpp32f locRaw = x * scale + center;
697  Rpp32s locFloor = std::floor(locRaw);
698  Rpp32f weight = locRaw - locFloor;
699  locFloor = std::max(std::min(locFloor, lookupSize - 2), 0);
700  Rpp32f current = lookup[locFloor];
701  Rpp32f next = lookup[locFloor + 1];
702  return current + weight * (next - current);
703  }
704 
705  inline __m128 operator()(__m128 x) {
706  __m128 pLocRaw = _mm_add_ps(_mm_mul_ps(x, pScale), pCenter);
707  __m128i pxLocFloor = _mm_cvttps_epi32(pLocRaw);
708  __m128 pLocFloor = _mm_cvtepi32_ps(pxLocFloor);
709  __m128 pWeight = _mm_sub_ps(pLocRaw, pLocFloor);
710  Rpp32s idx[4];
711  _mm_storeu_si128(reinterpret_cast<__m128i*>(idx), pxLocFloor);
712  __m128 pCurrent =
713  _mm_setr_ps(lookup[idx[0]], lookup[idx[1]], lookup[idx[2]], lookup[idx[3]]);
714  __m128 pNext = _mm_setr_ps(lookup[idx[0] + 1], lookup[idx[1] + 1], lookup[idx[2] + 1],
715  lookup[idx[3] + 1]);
716  return _mm_add_ps(pCurrent, _mm_mul_ps(pWeight, _mm_sub_ps(pNext, pCurrent)));
717  }
718 
719  Rpp32f scale = 1, center = 1;
720  Rpp32s lobes = 0, coeffs = 0;
721  Rpp32s lookupSize = 0;
722  Rpp32f* lookupPinned = nullptr;
723  std::vector<Rpp32f> lookup;
724  __m128 pCenter, pScale;
726 
730 struct BaseMelScale {
731  public:
732  inline RPP_HOST_DEVICE virtual Rpp32f hz_to_mel(Rpp32f hz) = 0;
733  inline RPP_HOST_DEVICE virtual Rpp32f mel_to_hz(Rpp32f mel) = 0;
734  virtual ~BaseMelScale() = default;
735 };
736 
740 struct HtkMelScale : public BaseMelScale {
741  inline RPP_HOST_DEVICE Rpp32f hz_to_mel(Rpp32f hz) {
742  return 1127.0f * std::log(1.0f + (hz / 700.0f));
743  }
744  inline RPP_HOST_DEVICE Rpp32f mel_to_hz(Rpp32f mel) {
745  return 700.0f * (std::exp(mel / 1127.0f) - 1.0f);
746  }
747 
748  public:
749  ~HtkMelScale() {};
750 };
751 
755 struct SlaneyMelScale : public BaseMelScale {
756  const Rpp32f freqLow = 0;
757  const Rpp32f fsp = 66.666667f;
758  const Rpp32f minLogHz = 1000.0;
759  const Rpp32f minLogMel = (minLogHz - freqLow) / fsp;
760  const Rpp32f stepLog = 0.068751777; // Equivalent to std::log(6.4) / 27.0;
761 
762  const Rpp32f invMinLogHz = 0.001f;
763  const Rpp32f invStepLog = 1.0f / stepLog;
764  const Rpp32f invFsp = 1.0f / fsp;
765 
766  inline RPP_HOST_DEVICE Rpp32f hz_to_mel(Rpp32f hz) {
767  Rpp32f mel = 0.0f;
768  if (hz >= minLogHz)
769  mel = minLogMel + std::log(hz * invMinLogHz) * invStepLog;
770  else
771  mel = (hz - freqLow) * invFsp;
772 
773  return mel;
774  }
775 
776  inline RPP_HOST_DEVICE Rpp32f mel_to_hz(Rpp32f mel) {
777  Rpp32f hz = 0.0f;
778  if (mel >= minLogMel)
779  hz = minLogHz * std::exp(stepLog * (mel - minLogMel));
780  else
781  hz = freqLow + mel * fsp;
782  return hz;
783  }
784 
785  public:
786  ~SlaneyMelScale() {};
787 };
788 
789 /******************** HOST memory typedefs ********************/
790 
794 typedef struct {
795  Rpp32f* scratchBufferHost;
796 } memCPU;
797 
798 #if RPP_BACKEND_HIP
799 
800 /******************** HIP memory typedefs ********************/
801 
805 typedef struct {
806  Rpp32f* floatmem;
807 } hipMemRpp32f;
808 
812 typedef struct {
813  hipMemRpp32f scratchBufferHip;
814  hipMemRpp32f scratchBufferPinned;
815 } memGPU;
816 
820 typedef struct {
821  memCPU mcpu;
822  memGPU mgpu;
823 } memMgmt;
824 
825 #else
826 
830 typedef struct {
831  memCPU mcpu;
832 } memMgmt;
833 
834 #endif // BACKEND
835 
839 typedef struct {
840  RppPtr_t cpuHandle;
841  Rpp32u nbatchSize;
842  memMgmt mem;
843 } InitHandle;
844 
845 #endif /* RPPDEFS_H */
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:125
int Rpp32s
32 bit signed int
Definition: rppdefs.h:127
signed char Rpp8s
8 bit signed char
Definition: rppdefs.h:119
RpptMelScaleFormula
RPPT Mel Scale Formula.
Definition: rppdefs.h:412
unsigned short Rpp16u
16 bit unsigned short
Definition: rppdefs.h:121
unsigned char Rpp8u
8 bit unsigned char
Definition: rppdefs.h:117
void * RppPtr_t
void pointer
Definition: rppdefs.h:137
RpptLayout
RPPT Tensor layout type enum.
Definition: rppdefs.h:322
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:360
RpptDataType
RPPT Tensor datatype enum.
Definition: rppdefs.h:317
RpptImageBorderType
RPPT Image Border Type.
Definition: rppdefs.h:403
struct RpptResamplingWindow RpptResamplingWindow
RPPT Tensor RpptResamplingWindow type struct.
double Rpp64f
64 bit double
Definition: rppdefs.h:135
RpptImageBorderEdge
RPPT Image Border Edge type enum.
Definition: rppdefs.h:398
RpptAudioBorderType
RPPT Audio Border Type.
Definition: rppdefs.h:393
size_t RppSize_t
size_t
Definition: rppdefs.h:139
RpptBitwiseOp
RPPT Broadcast Mode type enum.
Definition: rppdefs.h:261
RpptColorStandard
Color space standard for NV12 to RGB (YUV/YCbCr to RGB matrix).
Definition: rppdefs.h:336
struct GenericFilter GenericFilter
RPPT Tensor GenericFilter type struct.
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:144
RpptColorRange
Color range (luma/chroma legal levels) for NV12 to RGB.
Definition: rppdefs.h:352
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:368
unsigned long long Rpp64u
64 bit unsigned long long
Definition: rppdefs.h:129
#define RPPT_MAX_DIMS
RPP maximum dimensions in tensor .
Definition: rppdefs.h:62
RpptInterpolationType
RPPT Tensor interpolation type enum.
Definition: rppdefs.h:381
RpptSubpixelLayout
RPPT Tensor subpixel layout type enum.
Definition: rppdefs.h:376
RpptOp
RPP Tensor Operations type enum.
Definition: rppdefs.h:251
short Rpp16s
16 bit signed short
Definition: rppdefs.h:123
float Rpp32f
32 bit float
Definition: rppdefs.h:133
RppBackend
RPP RppBackend type enums.
Definition: rppdefs.h:231
long long Rpp64s
64 bit long long
Definition: rppdefs.h:131
rppStatus_t
RPP rppStatus_t type enums.
Definition: rppdefs.h:236
@ RpptColorStandard_FCC
Definition: rppdefs.h:338
@ RpptColorStandard_SMPTE240M
Definition: rppdefs.h:341
@ RpptColorStandard_BT601
Definition: rppdefs.h:340
@ RpptColorStandard_BT470BG
Definition: rppdefs.h:339
@ RpptColorStandard_BT709
Definition: rppdefs.h:337
@ RpptColorStandard_BT2020_NCL
Definition: rppdefs.h:342
@ RpptColorStandard_BT2020_CL
Definition: rppdefs.h:343
@ RPP_ERROR_NOT_IMPLEMENTED
Function variant requested is not implemented / unsupported.
Definition: rppdefs.h:161
@ RPP_ERROR_INVALID_DST_DATATYPE
Invalid dst tensor datatype. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:179
@ RPP_ERROR_INVALID_OUTPUT_TILE_LENGTH
Invalid output tile length (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:200
@ RPP_ERROR_INVALID_DIM_LENGTHS
Length in some dimensions are invalid. (Needs to adhere to function specification....
Definition: rppdefs.h:215
@ RPP_ERROR_OUT_OF_BOUND_SRC_ROI
Out of bound source ROI.
Definition: rppdefs.h:192
@ RPP_ERROR_OUT_OF_BOUND_SHARED_MEMORY_SIZE
Shared memory size needed is beyond the bounds (Needs to adhere to function specification....
Definition: rppdefs.h:203
@ RPP_ERROR_INCOMPATIBLE_BACKEND
The user specified backend is not compatible with the initialized handle group_rppdefs.
Definition: rppdefs.h:221
@ RPP_ERROR_HIP_LAUNCH
HIP/GPU runtime or kernel launch error.
Definition: rppdefs.h:223
@ RPP_ERROR_ZERO_DIVISION
Arguments provided will result in zero division error.
Definition: rppdefs.h:155
@ RPP_ERROR_INVALID_ARGUMENTS
One or more arguments invalid. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:151
@ RPP_ERROR_LAYOUT_MISMATCH
src and dst layout mismatch
Definition: rppdefs.h:194
@ RPP_ERROR_INVALID_CHANNELS
Number of channels is invalid. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:197
@ RPP_ERROR_INVALID_SRC_CHANNELS
Invalid src tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:164
@ RPP_ERROR_INVALID_SRC_OR_DST_DATATYPE
Invalid src/dst tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:182
@ RPP_ERROR_INVALID_PARAMETER_DATATYPE
Invalid datatype.
Definition: rppdefs.h:187
@ RPP_ERROR_NOT_ENOUGH_MEMORY
Not enough memory to write outputs, as per dim-lengths and strides set in descriptor.
Definition: rppdefs.h:190
@ RPP_ERROR
Unspecified error.
Definition: rppdefs.h:148
@ RPP_ERROR_INVALID_SRC_DIMS
Number of src dims is invalid. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:209
@ RPP_ERROR_OUT_OF_BOUND_SCRATCH_MEMORY_SIZE
Scratch memory size needed is beyond the bounds (Needs to adhere to function specification....
Definition: rppdefs.h:206
@ RPP_ERROR_INVALID_DST_LAYOUT
Invalid dst tensor layout. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:173
@ RPP_ERROR_INVALID_AXIS
The specified axis is invalid or out of range. (Needs to adhere to function specification....
Definition: rppdefs.h:218
@ RPP_ERROR_INVALID_DST_CHANNELS
Invalid dst tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:167
@ RPP_ERROR_HIP_RUNTIME
Internal HIP/GPU runtime error.
Definition: rppdefs.h:225
@ RPP_ERROR_INVALID_SRC_DATATYPE
Invalid src tensor datatype. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:176
@ RPP_ERROR_INVALID_SRC_LAYOUT
Invalid src tensor layout. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:170
@ RPP_ERROR_HIGH_SRC_DIMENSION
Src tensor / src ROI dimension too high. (Needs to adhere to function specification....
Definition: rppdefs.h:158
@ RPP_SUCCESS
No error.
Definition: rppdefs.h:146
@ RPP_ERROR_INSUFFICIENT_DST_BUFFER_LENGTH
Insufficient dst buffer length provided. (Needs to adhere to function specification....
Definition: rppdefs.h:185
@ RPP_ERROR_INVALID_DST_DIMS
Number of dst dims is invalid. (Needs to adhere to function specification.) group_rppdefs.
Definition: rppdefs.h:212
@ RPP_ERROR_LOW_OFFSET
Low tensor offsetInBytes provided for src/dst tensor.
Definition: rppdefs.h:153
@ RpptColorRange_FULL
Definition: rppdefs.h:354
@ RpptColorRange_STUDIO
Definition: rppdefs.h:353
RpptBroadcastMode
Broadcast support mode for RPP Tensor operations.
Definition: rppdefs.h:270
Base class for Mel scale conversions.
Definition: rppdefs.h:730
RPPT Tensor GenericFilter type struct.
Definition: rppdefs.h:642
Derived class for HTK Mel scale conversions.
Definition: rppdefs.h:740
RPP initialize handle.
Definition: rppdefs.h:839
RPP 24 float vector.
Definition: rppdefs.h:308
RPP 6 float vector.
Definition: rppdefs.h:287
RPP 9 float vector.
Definition: rppdefs.h:294
RPP 24 signed int vector.
Definition: rppdefs.h:301
RPP layout params.
Definition: rppdefs.h:279
RPPT Tensor 2D bilinear neighborhood 32-bit signed int 8-length-vectors type struct.
Definition: rppdefs.h:622
RPPT Tensor 2D bilinear neighborhood 32-bit float 8-length-vectors type struct.
Definition: rppdefs.h:632
RPPT Tensor Channel Offsets struct.
Definition: rppdefs.h:446
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:509
RPPT Tensor 32-bit float RGB type struct.
Definition: rppdefs.h:571
RPPT Tensor 2D 32-bit float vector type struct.
Definition: rppdefs.h:588
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:550
RPPT Tensor 2D image patch dimensions type struct.
Definition: rppdefs.h:596
RPPT Image 2D cartesian point type struct.
Definition: rppdefs.h:421
RPPT Image 3D point type struct.
Definition: rppdefs.h:429
RPPT Tensor 8-bit uchar RGB type struct.
Definition: rppdefs.h:562
RPPT Tensor RpptResamplingWindow type struct.
Definition: rppdefs.h:688
RPPT Tensor 3D ROI LTFRBB struct.
Definition: rppdefs.h:455
RPPT Tensor 2D ROI LTRB struct.
Definition: rppdefs.h:438
RPPT Tensor 2D ROI XYWH struct.
Definition: rppdefs.h:463
RPPT Tensor 3D ROI XYZWHD struct.
Definition: rppdefs.h:472
RPPT Tensor strides type struct.
Definition: rppdefs.h:499
RPPT Tensor 2D 32-bit uint vector type struct.
Definition: rppdefs.h:580
RPPT Tensor random number generator state (xorwow box muller state) type struct.
Definition: rppdefs.h:612
RPPT Tensor random number generator state (xorwow state) type struct.
Definition: rppdefs.h:604
Derived class for Slaney Mel scale conversions.
Definition: rppdefs.h:755
RPP HIP 32-bit float memory.
Definition: rppdefs.h:805
RPP HOST memory type struct.
Definition: rppdefs.h:794
RPP HIP memory management type struct.
Definition: rppdefs.h:812
RPP HIP-HOST memory management.
Definition: rppdefs.h:820
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:490
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:481