| 957 | } |
| 958 | |
| 959 | mluOpStatus_t MLUOP_WIN_API mluOpGetTensorAndDataFromTensorSet( |
| 960 | mluOpTensorSetDescriptor_t tensorSet, const int tensorSetDimNb, |
| 961 | const int *tensorIndex, void *data, mluOpTensorDescriptor_t *tensorDesc, |
| 962 | void **dataAddrInDevice) { |
| 963 | PARAM_CHECK("[mluOpGetTensorAndDataFromTensorSet]", tensorSet != NULL); |
| 964 | PARAM_CHECK("[mluOpGetTensorAndDataFromTensorSet]", |
| 965 | tensorSet->dim_num == tensorSetDimNb); |
| 966 | *tensorDesc = tensorSet->getTensor(tensorIndex); |
| 967 | auto offset = tensorSet->getOffset(tensorIndex); |
| 968 | *dataAddrInDevice = (void *)((char *)data + offset); |
| 969 | return MLUOP_STATUS_SUCCESS; |
| 970 | } |
| 971 | |
| 972 | mluOpStatus_t MLUOP_WIN_API mluOpSetSeqDataDescriptorOnchipDataType( |
| 973 | mluOpSeqDataDescriptor_t desc, mluOpDataType_t onchip_dtype) { |