Skip to content

Commit 35c5ecc

Browse files
committed
Merge branch 'sycl' into review/yang/fix_metadata_assert
2 parents 6db5db0 + 51f8152 commit 35c5ecc

File tree

91 files changed

+4360
-788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+4360
-788
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ option(UR_USE_ASAN "enable AddressSanitizer" OFF)
2727
option(UR_USE_UBSAN "enable UndefinedBehaviorSanitizer" OFF)
2828
option(UR_USE_MSAN "enable MemorySanitizer" OFF)
2929
option(UR_USE_TSAN "enable ThreadSanitizer" OFF)
30-
option(UR_USE_CFI "enable Control Flow Integrity checks (requires clang and implies -flto)" ON)
30+
option(UR_USE_CFI "enable Control Flow Integrity checks (requires clang and implies -flto)" OFF)
3131
option(UR_ENABLE_TRACING "enable api tracing through xpti" OFF)
3232
option(UR_ENABLE_SANITIZER "enable device sanitizer" ON)
3333
option(UR_ENABLE_SYMBOLIZER "enable symoblizer for sanitizer" OFF)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ List of options provided by CMake:
130130
| UR_USE_TSAN | Enable ThreadSanitizer | ON/OFF | OFF |
131131
| UR_USE_UBSAN | Enable UndefinedBehavior Sanitizer | ON/OFF | OFF |
132132
| UR_USE_MSAN | Enable MemorySanitizer (clang only) | ON/OFF | OFF |
133-
| UR_USE_CFI | Enable Control Flow Integrity checks (clang only, also enables lto) | ON/OFF | ON |
133+
| UR_USE_CFI | Enable Control Flow Integrity checks (clang only, also enables lto) | ON/OFF | OFF |
134134
| UR_ENABLE_TRACING | Enable XPTI-based tracing layer | ON/OFF | OFF |
135135
| UR_ENABLE_SANITIZER | Enable device sanitizer layer | ON/OFF | ON |
136136
| UR_CONFORMANCE_TARGET_TRIPLES | SYCL triples to build CTS device binaries for | Comma-separated list | spir64 |

cmake/FindRocmAgentEnumerator.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# rocm_agent_enumerator is found.
1010
#
1111

12-
find_program(ROCM_AGENT_ENUMERATOR NAMES rocm_agent_enumerator)
12+
find_program(ROCM_AGENT_ENUMERATOR NAMES rocm_agent_enumerator PATHS /opt/rocm/bin)
1313

1414
if(ROCM_AGENT_ENUMERATOR)
1515
set(ROCM_AGENT_ENUMERATOR_FOUND TRUE)

include/ur_api.h

Lines changed: 259 additions & 3 deletions
Large diffs are not rendered by default.

include/ur_api_funcs.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ _UR_API(urCommandBufferUpdateSignalEventExp)
185185
_UR_API(urCommandBufferUpdateWaitEventsExp)
186186
_UR_API(urCommandBufferGetInfoExp)
187187
_UR_API(urCommandBufferCommandGetInfoExp)
188+
_UR_API(urTensorMapEncodeIm2ColExp)
189+
_UR_API(urTensorMapEncodeTiledExp)
188190
_UR_API(urUsmP2PEnablePeerAccessExp)
189191
_UR_API(urUsmP2PDisablePeerAccessExp)
190192
_UR_API(urUsmP2PPeerAccessGetInfoExp)

include/ur_ddi.h

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ typedef ur_result_t(UR_APICALL *ur_pfnGetKernelProcAddrTable_t)(
651651
/// @brief Function-pointer for urKernelSuggestMaxCooperativeGroupCountExp
652652
typedef ur_result_t(UR_APICALL *ur_pfnKernelSuggestMaxCooperativeGroupCountExp_t)(
653653
ur_kernel_handle_t,
654-
size_t,
654+
uint32_t,
655+
const size_t *,
655656
size_t,
656657
uint32_t *);
657658

@@ -2249,6 +2250,71 @@ typedef ur_result_t(UR_APICALL *ur_pfnGetCommandBufferExpProcAddrTable_t)(
22492250
ur_api_version_t,
22502251
ur_command_buffer_exp_dditable_t *);
22512252

2253+
///////////////////////////////////////////////////////////////////////////////
2254+
/// @brief Function-pointer for urTensorMapEncodeIm2ColExp
2255+
typedef ur_result_t(UR_APICALL *ur_pfnTensorMapEncodeIm2ColExp_t)(
2256+
ur_device_handle_t,
2257+
ur_exp_tensor_map_data_type_flags_t,
2258+
uint32_t,
2259+
void *,
2260+
const uint64_t *,
2261+
const uint64_t *,
2262+
const int *,
2263+
const int *,
2264+
uint32_t,
2265+
uint32_t,
2266+
const uint32_t *,
2267+
ur_exp_tensor_map_interleave_flags_t,
2268+
ur_exp_tensor_map_swizzle_flags_t,
2269+
ur_exp_tensor_map_l2_promotion_flags_t,
2270+
ur_exp_tensor_map_oob_fill_flags_t,
2271+
ur_exp_tensor_map_handle_t *);
2272+
2273+
///////////////////////////////////////////////////////////////////////////////
2274+
/// @brief Function-pointer for urTensorMapEncodeTiledExp
2275+
typedef ur_result_t(UR_APICALL *ur_pfnTensorMapEncodeTiledExp_t)(
2276+
ur_device_handle_t,
2277+
ur_exp_tensor_map_data_type_flags_t,
2278+
uint32_t,
2279+
void *,
2280+
const uint64_t *,
2281+
const uint64_t *,
2282+
const uint32_t *,
2283+
const uint32_t *,
2284+
ur_exp_tensor_map_interleave_flags_t,
2285+
ur_exp_tensor_map_swizzle_flags_t,
2286+
ur_exp_tensor_map_l2_promotion_flags_t,
2287+
ur_exp_tensor_map_oob_fill_flags_t,
2288+
ur_exp_tensor_map_handle_t *);
2289+
2290+
///////////////////////////////////////////////////////////////////////////////
2291+
/// @brief Table of TensorMapExp functions pointers
2292+
typedef struct ur_tensor_map_exp_dditable_t {
2293+
ur_pfnTensorMapEncodeIm2ColExp_t pfnEncodeIm2ColExp;
2294+
ur_pfnTensorMapEncodeTiledExp_t pfnEncodeTiledExp;
2295+
} ur_tensor_map_exp_dditable_t;
2296+
2297+
///////////////////////////////////////////////////////////////////////////////
2298+
/// @brief Exported function for filling application's TensorMapExp table
2299+
/// with current process' addresses
2300+
///
2301+
/// @returns
2302+
/// - ::UR_RESULT_SUCCESS
2303+
/// - ::UR_RESULT_ERROR_UNINITIALIZED
2304+
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
2305+
/// - ::UR_RESULT_ERROR_UNSUPPORTED_VERSION
2306+
UR_DLLEXPORT ur_result_t UR_APICALL
2307+
urGetTensorMapExpProcAddrTable(
2308+
ur_api_version_t version, ///< [in] API version requested
2309+
ur_tensor_map_exp_dditable_t *pDdiTable ///< [in,out] pointer to table of DDI function pointers
2310+
);
2311+
2312+
///////////////////////////////////////////////////////////////////////////////
2313+
/// @brief Function-pointer for urGetTensorMapExpProcAddrTable
2314+
typedef ur_result_t(UR_APICALL *ur_pfnGetTensorMapExpProcAddrTable_t)(
2315+
ur_api_version_t,
2316+
ur_tensor_map_exp_dditable_t *);
2317+
22522318
///////////////////////////////////////////////////////////////////////////////
22532319
/// @brief Function-pointer for urUsmP2PEnablePeerAccessExp
22542320
typedef ur_result_t(UR_APICALL *ur_pfnUsmP2PEnablePeerAccessExp_t)(
@@ -2516,6 +2582,7 @@ typedef struct ur_dditable_t {
25162582
ur_usm_dditable_t USM;
25172583
ur_usm_exp_dditable_t USMExp;
25182584
ur_command_buffer_exp_dditable_t CommandBufferExp;
2585+
ur_tensor_map_exp_dditable_t TensorMapExp;
25192586
ur_usm_p2p_exp_dditable_t UsmP2PExp;
25202587
ur_virtual_mem_dditable_t VirtualMem;
25212588
ur_device_dditable_t Device;

include/ur_print.h

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,46 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandFlags(enum ur_
10981098
/// - `buff_size < out_size`
10991099
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpEnqueueNativeCommandProperties(const struct ur_exp_enqueue_native_command_properties_t params, char *buffer, const size_t buff_size, size_t *out_size);
11001100

1101+
///////////////////////////////////////////////////////////////////////////////
1102+
/// @brief Print ur_exp_tensor_map_data_type_flag_t enum
1103+
/// @returns
1104+
/// - ::UR_RESULT_SUCCESS
1105+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1106+
/// - `buff_size < out_size`
1107+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapDataTypeFlags(enum ur_exp_tensor_map_data_type_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
1108+
1109+
///////////////////////////////////////////////////////////////////////////////
1110+
/// @brief Print ur_exp_tensor_map_interleave_flag_t enum
1111+
/// @returns
1112+
/// - ::UR_RESULT_SUCCESS
1113+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1114+
/// - `buff_size < out_size`
1115+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapInterleaveFlags(enum ur_exp_tensor_map_interleave_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
1116+
1117+
///////////////////////////////////////////////////////////////////////////////
1118+
/// @brief Print ur_exp_tensor_map_l2_promotion_flag_t enum
1119+
/// @returns
1120+
/// - ::UR_RESULT_SUCCESS
1121+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1122+
/// - `buff_size < out_size`
1123+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapL2PromotionFlags(enum ur_exp_tensor_map_l2_promotion_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
1124+
1125+
///////////////////////////////////////////////////////////////////////////////
1126+
/// @brief Print ur_exp_tensor_map_swizzle_flag_t enum
1127+
/// @returns
1128+
/// - ::UR_RESULT_SUCCESS
1129+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1130+
/// - `buff_size < out_size`
1131+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapSwizzleFlags(enum ur_exp_tensor_map_swizzle_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
1132+
1133+
///////////////////////////////////////////////////////////////////////////////
1134+
/// @brief Print ur_exp_tensor_map_oob_fill_flag_t enum
1135+
/// @returns
1136+
/// - ::UR_RESULT_SUCCESS
1137+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
1138+
/// - `buff_size < out_size`
1139+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpTensorMapOobFillFlags(enum ur_exp_tensor_map_oob_fill_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
1140+
11011141
///////////////////////////////////////////////////////////////////////////////
11021142
/// @brief Print ur_loader_config_create_params_t struct
11031143
/// @returns
@@ -2522,6 +2562,22 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferGetInfoExpParams(const s
25222562
/// - `buff_size < out_size`
25232563
UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferCommandGetInfoExpParams(const struct ur_command_buffer_command_get_info_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size);
25242564

2565+
///////////////////////////////////////////////////////////////////////////////
2566+
/// @brief Print ur_tensor_map_encode_im_2_col_exp_params_t struct
2567+
/// @returns
2568+
/// - ::UR_RESULT_SUCCESS
2569+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
2570+
/// - `buff_size < out_size`
2571+
UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeIm_2ColExpParams(const struct ur_tensor_map_encode_im_2_col_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size);
2572+
2573+
///////////////////////////////////////////////////////////////////////////////
2574+
/// @brief Print ur_tensor_map_encode_tiled_exp_params_t struct
2575+
/// @returns
2576+
/// - ::UR_RESULT_SUCCESS
2577+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
2578+
/// - `buff_size < out_size`
2579+
UR_APIEXPORT ur_result_t UR_APICALL urPrintTensorMapEncodeTiledExpParams(const struct ur_tensor_map_encode_tiled_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size);
2580+
25252581
///////////////////////////////////////////////////////////////////////////////
25262582
/// @brief Print ur_usm_p2p_enable_peer_access_exp_params_t struct
25272583
/// @returns

0 commit comments

Comments
 (0)