| 100 | |
| 101 | template <int out_dim> |
| 102 | void setup_and_launch_dim( |
| 103 | const megdnn::DType dtype, const JITExecutor* fusion_opr, CUfunction func, |
| 104 | int block_size) { |
| 105 | switch (dtype.enumv()) { |
| 106 | #define cb(_dtype, _type) \ |
| 107 | case megdnn::DTypeEnum::_dtype: \ |
| 108 | setup_and_launch<out_dim, _type>(fusion_opr, func, block_size); \ |
| 109 | return; |
| 110 | FOR_EACH_DNN_DTYPE(cb) |
| 111 | #undef cb |
| 112 | default: |
| 113 | mgb_throw(InternalError, "Unsupported dtype: %s", dtype.name()); |
| 114 | } |
| 115 | return; |
| 116 | } |
| 117 | |
| 118 | } // namespace |
| 119 |