Skip to content

Commit

Permalink
Merge pull request #2502 from ldrumm/luke/tensormap-version
Browse files Browse the repository at this point in the history
CUTensorMap is only in CUDA v12
  • Loading branch information
martygrant authored Jan 3, 2025
2 parents db491ab + f8b04f4 commit ad288bb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions source/adapters/cuda/tensor_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@

#include "context.hpp"

#if CUDA_VERSION < 12000
UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeIm2ColExp(
ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, void *,
const uint64_t *, const uint64_t *, const int *, const int *, uint32_t,
uint32_t, const uint32_t *, ur_exp_tensor_map_interleave_flags_t,
ur_exp_tensor_map_swizzle_flags_t, ur_exp_tensor_map_l2_promotion_flags_t,
ur_exp_tensor_map_oob_fill_flags_t, ur_exp_tensor_map_handle_t *) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
ur_device_handle_t, ur_exp_tensor_map_data_type_flags_t, uint32_t, void *,
const uint64_t *, const uint64_t *, const uint32_t *, const uint32_t *,
ur_exp_tensor_map_interleave_flags_t, ur_exp_tensor_map_swizzle_flags_t,
ur_exp_tensor_map_l2_promotion_flags_t, ur_exp_tensor_map_oob_fill_flags_t,
ur_exp_tensor_map_handle_t *) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
#else
struct ur_exp_tensor_map_handle_t_ {
CUtensorMap Map;
};
Expand Down Expand Up @@ -140,3 +158,4 @@ UR_APIEXPORT ur_result_t UR_APICALL urTensorMapEncodeTiledExp(
}
return UR_RESULT_SUCCESS;
}
#endif

0 comments on commit ad288bb

Please sign in to comment.