Skip to content

Commit db7aff1

Browse files
authored
Merge pull request #2502 from ldrumm/luke/tensormap-version
CUTensorMap is only in CUDA v12
2 parents 6b7b44b + b748c99 commit db7aff1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

source/adapters/cuda/tensor_map.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@
1313

1414
#include "context.hpp"
1515

16+
#if CUDA_VERSION < 12000
17+
UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp(
18+
ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, void *,
19+
const uint64_t *, const uint64_t *, const int *, const int *, uint32_t,
20+
uint32_t, const uint32_t *, ur_exp_tensor_map_interleave_flags_t,
21+
ur_exp_tensor_map_swizzle_flags_t, ur_exp_tensor_map_l2_promotion_flags_t,
22+
ur_exp_tensor_map_oob_fill_flags_t, ur_exp_tensor_map_handle_t *) {
23+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
24+
}
25+
UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
26+
ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, void *,
27+
const uint64_t *, const uint64_t *, const uint32_t *, const uint32_t *,
28+
ur_exp_tensor_map_interleave_flags_t, ur_exp_tensor_map_swizzle_flags_t,
29+
ur_exp_tensor_map_l2_promotion_flags_t, ur_exp_tensor_map_oob_fill_flags_t,
30+
ur_exp_tensor_map_handle_t *) {
31+
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
32+
}
33+
#else
1634
struct ur_exp_tensor_map_handle_t_ {
1735
CUtensorMap Map;
1836
};
@@ -140,3 +158,4 @@ UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
140158
}
141159
return UR_RESULT_SUCCESS;
142160
}
161+
#endif

0 commit comments

Comments
 (0)