@@ -939,7 +939,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
939939</ div >
940940< div class ="listingblock ">
941941< div class ="content ">
942- < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clEnqueueTranslateFromTensor (
942+ < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clEnqueueImportFromTensor (
943943 cl_command_queue command_queue,
944944 cl_tensor tensor,
945945 cl_bool blocking_command,
@@ -956,7 +956,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
956956</ div >
957957< div class ="listingblock ">
958958< div class ="content ">
959- < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clEnqueueTranslateToTensor (
959+ < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clEnqueueExportToTensor (
960960 cl_command_queue command_queue,
961961 cl_tensor tensor,
962962 cl_bool blocking_command,
@@ -1040,10 +1040,10 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
10401040</ ul >
10411041</ div >
10421042< div class ="paragraph ">
1043- < p > The < strong > clEnqueueTranslateToTensor </ strong > function copies contents of the buffer
1043+ < p > The < strong > clEnqueueExportToTensor </ strong > function copies contents of the buffer
10441044object / host allocation to tensor’s storage in
10451045implementation-defined, opaque memory layout. The
1046- < strong > clEnqueueTranslateFromTensor </ strong > function copies data from tensor’s
1046+ < strong > clEnqueueImportFromTensor </ strong > function copies data from tensor’s
10471047storage to buffer object / host allocation.</ p >
10481048</ div >
10491049< div class ="paragraph ">
@@ -1089,7 +1089,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
10891089storage addresses is unspecified.</ p >
10901090</ div >
10911091< div class ="paragraph ">
1092- < p > < strong > clEnqueueTranslateFsomTensor </ strong > and < strong > clEnqueueTranslateToTensor </ strong >
1092+ < p > < strong > clEnqueueImportFromTensor </ strong > and < strong > clEnqueueExportToTensor </ strong >
10931093returns CL_SUCCESS if the function is executed
10941094successfully. Otherwise, it returns one of the following errors:</ p >
10951095</ div >
@@ -1151,13 +1151,13 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
11511151</ ul >
11521152</ div >
11531153< div class ="paragraph ">
1154- < p > If < strong > cl_khr_command_buffer</ strong > is is supported, then the following command
1155- buffer counterparts of the < strong > clEnqueueTranslateFromTensor </ strong > and
1156- < strong > clEnqueueTranslateToTensor </ strong > commands are available.</ p >
1154+ < p > If < strong > cl_khr_command_buffer</ strong > is supported, then the following command
1155+ buffer counterparts of the < strong > clEnqueueImportFromTensor </ strong > and
1156+ < strong > clEnqueueExportToTensor </ strong > commands are available.</ p >
11571157</ div >
11581158< div class ="listingblock ">
11591159< div class ="content ">
1160- < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clCommandTranslateFromTensorKHR (
1160+ < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clCommandImportFromTensorKHR (
11611161 cl_command_buffer_khr command_buffer,
11621162 cl_command_queue command_queue,
11631163 cl_tensor tensor,
@@ -1175,7 +1175,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
11751175</ div >
11761176< div class ="listingblock ">
11771177< div class ="content ">
1178- < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clCommandTranslateToTensorKHR (
1178+ < pre class ="highlight "> < code class ="language-c " data-lang ="c "> cl_int clCommandExportToTensorKHR (
11791179 cl_command_buffer_khr command_buffer,
11801180 cl_command_queue command_queue,
11811181 cl_tensor tensor,
@@ -1199,7 +1199,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
11991199< li >
12001200< p > For < em > command_queue</ em > , < em > tensor</ em > , < em > tensor_origin</ em > , < em > mem_origin</ em > ,
12011201< em > region</ em > , < em > mem_pitch</ em > , < em > buffer</ em > and < em > host_ptr</ em > parameters refer to
1202- < strong > clEnqueueTranslateFromTensor </ strong > .</ p >
1202+ < strong > clEnqueueImportFromTensor </ strong > .</ p >
12031203</ li >
12041204< li >
12051205< p > For < em > num_sync_points_in_wait_list</ em > , < em > sync_point_wait_list</ em > ,
@@ -1209,7 +1209,7 @@ <h4 id="_new_opencl_functions_added_to_tensor_objects_section">New OpenCL Functi
12091209</ ul >
12101210</ div >
12111211< div class ="paragraph ">
1212- < p > < strong > clCommandTranslateFromTensorKHR </ strong > and < strong > clCommandTranslateFromTensorKHR </ strong >
1212+ < p > < strong > clCommandImportFromTensorKHR </ strong > and < strong > clCommandImportFromTensorKHR </ strong >
12131213returns CL_SUCCESS if the function is executed
12141214successfully. Otherwise, it returns one of the following errors:</ p >
12151215</ div >
@@ -1458,17 +1458,17 @@ <h3 id="_sample_codes">Sample Codes</h3>
14581458
14591459// Copies data into in0 tensor while possibly rearranging the data to the
14601460// optimal data layout.
1461- clEnqueueTranslateToTensor (
1461+ clEnqueueExportToTensor (
14621462 cmd_q, in0, false, {0, 0, 0}, {0, 0, 0}, {b, m, k},
14631463 nullptr, nullptr, in0_data.data(), 0, nullptr, nullptr);
1464- clEnqueueTranslateToTensor (
1464+ clEnqueueExportToTensor (
14651465 cmd_q, in1, false, {0, 0, 0}, {0, 0, 0}, {b, k, n},
14661466 nullptr, nullptr, in1_data.data(), 0, nullptr, nullptr);
14671467clEnqueueNDRangeKernel(
14681468 cmd_q, matmul_kernel, 3, matmul_grid, nullptr, nullptr, 0, nullptr, nullptr);
14691469clEnqueueNDRangeKernel(
14701470 cmd_q, add_kernel, 3, add_grid, nullptr, nullptr, 0, nullptr, nullptr);
1471- clEnqueueTranslateFromTensor (
1471+ clEnqueueImportFromTensor (
14721472 cmd_q, out, false, {0, 0, 0}, {0, 0, 0}, {b, m, n},
14731473 nullptr, nullptr, out_data.data(), 0, nullptr, nullptr);</ code > </ pre >
14741474</ div >
@@ -1521,10 +1521,10 @@ <h3 id="_sample_codes">Sample Codes</h3>
15211521 clCreateCommandBufferKHR(num_queues, queue_list, nullptr, &err);
15221522
15231523cl_sync_point_khr in0_syncp, in1_syncp, matmul_syncp, add_syncp;
1524- clCommandTranslateToTensorKHR (
1524+ clCommandExportToTensorKHR (
15251525 cmd_b, cmd_q, in0, {0, 0, 0}, {0, 0, 0}, {b, m, k},
15261526 nullptr, nullptr, in0_data.data(), 0, nullptr, &in0_syncp);
1527- clCommandTranslateToTensorKHR (
1527+ clCommandExportToTensorKHR (
15281528 cmd_b, cmd_q, in1, {0, 0, 0}, {0, 0, 0}, {b, k, m},
15291529 nullptr, nullptr, in1_data.data(), 0, nullptr, &in1_syncp);
15301530clCommandNDRangeKernelKHR(
@@ -1533,7 +1533,7 @@ <h3 id="_sample_codes">Sample Codes</h3>
15331533clCommandNDRangeKernelKHR(
15341534 cmd_b, cmd_q, nullptr, add_kernel, 3, add_grid, nullptr, nullptr,
15351535 1, {matmul_syncp}, &add_syncp, nullptr);
1536- clCommandTranslateFromTensorKHR (
1536+ clCommandImportFromTensorKHR (
15371537 cmd_b, cmd_q, out, {0, 0, 0}, {0, 0, 0}, {b, k, m},
15381538 nullptr, nullptr, out_data.data(), 1, {add_syncp}, nullptr);
15391539
@@ -1547,7 +1547,7 @@ <h3 id="_sample_codes">Sample Codes</h3>
15471547// Temporary tensors used in a command buffer can't be read or written
15481548// into. A hypothetical reason is that the finalized command buffer
15491549// might not use some of the tensor.
1550- assert(clEnqueueTranslateFromTensor (..., t0, ...) == CL_INVALID_OPERATION);</ code > </ pre >
1550+ assert(clEnqueueImportFromTensor (..., t0, ...) == CL_INVALID_OPERATION);</ code > </ pre >
15511551</ div >
15521552</ div >
15531553</ div >
@@ -1592,7 +1592,7 @@ <h3 id="_open_questions">Open Questions</h3>
15921592</ div >
15931593< div id ="footer ">
15941594< div id ="footer-text ">
1595- Last updated 2023-11-16 17:25:21 +0200
1595+ Last updated 2023-11-17 12:20:18 +0200
15961596</ div >
15971597</ div >
15981598</ body >
0 commit comments