File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
experimental/gen_ai/src/quantize/ck_extensions Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ if(NOT FBGEMM_CPU_ONLY)
195
195
add_subdirectory (experimental/gemm )
196
196
endif ()
197
197
198
- if (NOT FBGEMM_CPU_ONLY AND NOT USE_ROCM )
198
+ if (NOT FBGEMM_CPU_ONLY )
199
199
# TODO: Re-enable gen_ai for ROCm once ck/tensor_operation/gpu/device/impl/device_gemm_multiple_d_xdl_cshuffle_v3_ab_scale.hpp
200
200
# lands into latest ROCm
201
201
add_subdirectory (experimental/gen_ai )
Original file line number Diff line number Diff line change 30
30
#include " ck/library/utility/host_tensor_generator.hpp"
31
31
#include " ck/library/utility/literals.hpp"
32
32
33
+ #if (defined(USE_ROCM) && ROCM_VERSION >= 60300)
34
+ // NOTE: This source is currently only available in the `develop` branch of CK
35
+ // https://github.com/ROCm/composable_kernel
33
36
#include " ck/tensor_operation/gpu/device/impl/device_gemm_multiple_d_xdl_cshuffle_v3_ab_scale.hpp"
37
+ #endif
34
38
35
39
// Define commonly used types.
36
40
template <ck::index_t ... Is>
@@ -42,6 +46,7 @@ using PassThrough = ck::tensor_operation::element_wise::PassThrough;
42
46
43
47
namespace fbgemm_gpu {
44
48
49
+ #if (defined(USE_ROCM) && ROCM_VERSION >= 60300)
45
50
template <
46
51
int BLOCK_SIZE,
47
52
int MBLOCK,
@@ -269,4 +274,20 @@ at::Tensor f8f8bf16_blockwise(
269
274
}
270
275
}
271
276
277
+ #else
278
+
279
+ at::Tensor f8f8bf16_blockwise (
280
+ at::Tensor XQ,
281
+ at::Tensor WQ,
282
+ at::Tensor x_scale,
283
+ at::Tensor w_scale,
284
+ int64_t block_m = 128 ,
285
+ int64_t block_n = 128 ,
286
+ int64_t block_k = 128 ) {
287
+ throw std::runtime_error (
288
+ " ROCm version is older than 6.3" ); // requires ROCm>=6.3
289
+ }
290
+
291
+ #endif
292
+
272
293
} // namespace fbgemm_gpu
You can’t perform that action at this time.
0 commit comments