| 390 | } |
| 391 | |
| 392 | mluOpStatus_t MLUOP_WIN_API mluOpSetQuantizeRoundMode( |
| 393 | mluOpHandle_t handle, mluOpQuantizeRoundMode_t round_mode) { |
| 394 | PARAM_CHECK("[mluOpSetQuantizeRoundMode]", handle != NULL); |
| 395 | PARAM_CHECK("[mluOpSetQuantizeRoundMode]", |
| 396 | round_mode == MLUOP_ROUND_HALF_TO_EVEN || |
| 397 | round_mode == MLUOP_ROUND_HALF_OFF_ZERO || |
| 398 | round_mode == MLUOP_ROUND_HALF_UP); |
| 399 | if (handle->arch < 372) { |
| 400 | if (round_mode == MLUOP_ROUND_HALF_TO_EVEN) { |
| 401 | LOG(ERROR) |
| 402 | << "[mluOpSetQuantizeRoundMode] Unsupported rounding mode on MLU200"; |
| 403 | return MLUOP_STATUS_BAD_PARAM; |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | handle->round_mode = round_mode; |
| 408 | |
| 409 | return MLUOP_STATUS_SUCCESS; |
| 410 | } |
| 411 | |
| 412 | mluOpStatus_t MLUOP_WIN_API mluOpGetQuantizeRoundMode( |
| 413 | mluOpHandle_t handle, mluOpQuantizeRoundMode_t *round_mode) { |
nothing calls this directly
no outgoing calls
no test coverage detected