Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUTensorMap is only in CUDA v12 #2502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading