| 5250 | } |
| 5251 | |
| 5252 | array to_fp8(array x, StreamOrDevice s) { |
| 5253 | if (!issubdtype(x.dtype(), floating)) { |
| 5254 | std::ostringstream msg; |
| 5255 | msg << "[to_fp8] Only real floating types are supported but " |
| 5256 | << "x.dtype() == " << x.dtype() << "."; |
| 5257 | throw std::invalid_argument(msg.str()); |
| 5258 | } |
| 5259 | return array( |
| 5260 | x.shape(), |
| 5261 | uint8, |
| 5262 | std::make_shared<fast::ConvertFP8>(to_stream(s), true), |
| 5263 | {x}); |
| 5264 | } |
| 5265 | |
| 5266 | array gather_qmm( |
| 5267 | const array& x, |
no test coverage detected