cuPHY  0.1
CUDA PHY Layer Acceration Library
Data Structures | Functions
Rate Matching

This section describes the rate matching functions of the cuPHY application programming interface. More...

Data Structures

struct  cuphyPuschRxRateMatchHndl_t
 

Functions

cuphyStatus_t cuphyCreatePuschRxRateMatch (cuphyPuschRxRateMatchHndl_t *puschRxRateMatchHndl, int FPconfig, int descramblingOn)
 Allocate and initialize a cuPHY PuschRx rate match object. More...
 
cuphyStatus_t cuphyDestroyPuschRxRateMatch (cuphyPuschRxRateMatchHndl_t puschRxRateMatchHndl)
 Destroys a cuPHY PUSCH rate match object. More...
 
cuphyStatus_t cuphyPuschRxRateMatchGetDescrInfo (size_t *pDescrSizeBytes, size_t *pDescrAlignBytes)
 Helper to compute cuPHY rate match descriptor buffer sizes and alignments. More...
 
cuphyStatus_t cuphySetupPuschRxRateMatch (cuphyPuschRxRateMatchHndl_t puschRxRateMatchHndl, uint16_t nSchUes, uint16_t *pSchUserIdxsCpu, const PerTbParams *pTbPrmsCpu, const PerTbParams *pTbPrmsGpu, cuphyTensorPrm_t *pTPrmRmIn, void **ppRmOut, void *pCpuDesc, void *pGpuDesc, uint8_t enableCpuToGpuDescrAsyncCpy, cuphyPuschRxRateMatchLaunchCfg_t *pLaunchCfg, cudaStream_t strm)
 Setup cuPHY rate match for slot processing. More...
 

Detailed Description

Function Documentation

◆ cuphyCreatePuschRxRateMatch()

cuphyStatus_t cuphyCreatePuschRxRateMatch ( cuphyPuschRxRateMatchHndl_t *  puschRxRateMatchHndl,
int  FPconfig,
int  descramblingOn 
)

Allocates a cuPHY pusch rate match object and returns a handle in the address provided by the caller.

Returns CUPHY_STATUS_INVALID_ARGUMENT if puschRxRateMatchHndl is NULL.

Returns CUPHY_STATUS_ALLOC_FAILED if a PuschRxRateMatch object cannot be allocated

Returns CUPHY_STATUS_SUCCESS if allocation and initialization were successful

Parameters
puschRxRateMatchHndl- Address to return the new PuschRxRateMatch instance
FPconfig-0: FP32 in, FP32 out; 1: FP16 in, FP32 out; 2: FP32 in, FP16 out; 3: FP16 in, FP16 out; other values: invalid
descramblingOn- enable/disable descrambling
Returns
CUPHY_STATUS_SUCCESS, CUPHY_STATUS_ALLOC_FAILED, CUPHY_STATUS_INVALID_ARGUMENT
See also
cuphyStatus_t,cuphyGetErrorName,cuphyGetErrorString,cuphyPuschRxRateMatchGetDescrInfo,cuphySetupPuschRxRateMatch,cuphyDestroyPuschRxRateMatch

◆ cuphyDestroyPuschRxRateMatch()

cuphyStatus_t cuphyDestroyPuschRxRateMatch ( cuphyPuschRxRateMatchHndl_t  puschRxRateMatchHndl)

Destroys a cuPHY PUSCH rate match object that was previously created by cuphyCreatePuschRxRateMatch. The handle provided to this function should not be used for any operations after this function returns.

Returns CUPHY_STATUS_INVALID_ARGUMENT if puschRxRateMatchHndl is NULL.

Returns CUPHY_STATUS_SUCCESS if destruction was successful.

Parameters
puschRxRateMatchHndl- handle to previously allocated PuschRxRateMatch instance
Returns
CUPHY_STATUS_SUCCESS, CUPHY_STATUS_INVALID_ARGUMENT
See also
cuphyStatus_t,cuphyGetErrorName,cuphyGetErrorString,cuphyPuschRxRateMatchGetDescrInfo,cuphyCreatePuschRxRateMatch,cuphySetupPuschRxRateMatch

◆ cuphyPuschRxRateMatchGetDescrInfo()

cuphyStatus_t cuphyPuschRxRateMatchGetDescrInfo ( size_t *  pDescrSizeBytes,
size_t *  pDescrAlignBytes 
)

Computes cuPHY PUSCH rate match descriptor buffer sizes and alignments. To be used by the caller to allocate these buffers (in CPU and GPU memories) and provide them to other PuschRxRateMatch APIs

Returns CUPHY_STATUS_INVALID_ARGUMENT if pDescrSizeBytes and/or pDescrAlignBytes

Returns CUPHY_STATUS_SUCCESS if allocation and initialization were successful.

Parameters
pDescrSizeBytes- Size in bytes descriptor
pDescrAlignBytes- Alignment of descriptor
Returns
CUPHY_STATUS_SUCCESS, CUPHY_STATUS_INVALID_ARGUMENT
See also
cuphyStatus_t,cuphyGetErrorName,cuphyGetErrorString,cuphyCreatePuschRxRateMatch,cuphyDestroyPuschRxRateMatch

◆ cuphySetupPuschRxRateMatch()

cuphyStatus_t cuphySetupPuschRxRateMatch ( cuphyPuschRxRateMatchHndl_t  puschRxRateMatchHndl,
uint16_t  nSchUes,
uint16_t *  pSchUserIdxsCpu,
const PerTbParams pTbPrmsCpu,
const PerTbParams pTbPrmsGpu,
cuphyTensorPrm_t *  pTPrmRmIn,
void **  ppRmOut,
void *  pCpuDesc,
void *  pGpuDesc,
uint8_t  enableCpuToGpuDescrAsyncCpy,
cuphyPuschRxRateMatchLaunchCfg_t *  pLaunchCfg,
cudaStream_t  strm 
)

Setup cuPHY PUSCH rate match in preparation towards slot execution

Returns CUPHY_STATUS_SUCCESS if setup is successful.

Returns CUPHY_STATUS_INVALID_ARGUMENT if puschRxRateMatchHndl and/or pSchUserIdxsCpu and/or pTbPrmsCpu and/or pTbPrmsGpu and/or pTPrmRmIn and/or ppRmOut and/or pCpuDesc and/or pGpuDesc and/or pLaunchCfg is NULL.

Parameters
puschRxRateMatchHndl- handle to rate-matching class
nSchUes- number of users with sch data
pSchUserIdxsCpu- Address of sch user indicies
pTbPrmsCpu- starting adress of transport block paramters (CPU)
pTbPrmsGpu- starting adress of transport block paramters (GPU)
pTPrmRmIn- starting adress of input LLR tensor parameters
ppRmOut- array of rm outputs, one per transport block (GPU)
pCpuDesc- pointer to descriptor in cpu
pGpuDesc- pointer to descriptor in gpu
enableCpuToGpuDescrAsyncCpy- option to copy cpu descriptors from cpu to gpu
pLaunchCfg- pointer to rate matching launch configuration
strm- stream to perform copy
Returns
CUPHY_STATUS_SUCCESS, CUPHY_STATUS_INVALID_ARGUMENT
See also
cuphyStatus_t,cuphyGetErrorName,cuphyGetErrorString,cuphyPuschRxRateMatchGetDescrInfo,cuphyCreatePuschRxRateMatch,cuphyDestroyPuschRxRateMatch