File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
runtime/dpct-rt/include/dpct Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1252,6 +1252,9 @@ void MapNames::setExplicitNamespaceMap(
1252
1252
{" CU_DEVICE_ATTRIBUTE_MAX_PITCH" ,
1253
1253
std::make_shared<EnumNameRule>(" get_max_pitch" ,
1254
1254
HelperFeatureEnum::device_ext)},
1255
+ {" CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT" ,
1256
+ std::make_shared<EnumNameRule>(" get_async_engine_count" ,
1257
+ HelperFeatureEnum::device_ext)},
1255
1258
{" CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED" ,
1256
1259
std::make_shared<EnumNameRule>(
1257
1260
DpctGlobalInfo::usePeerAccess ()
Original file line number Diff line number Diff line change 15
15
#include < cstring>
16
16
#include < functional>
17
17
#include < iostream>
18
+ #include < limits>
18
19
#include < map>
19
20
#include < mutex>
20
21
#include < set>
@@ -525,7 +526,9 @@ class device_ext : public sycl::device {
525
526
return get_device_info().get_local_mem_size();
526
527
}
527
528
528
- int get_max_pitch() const { return INT_MAX; }
529
+ int get_max_pitch() const { return std::numeric_limits<int>::max(); }
530
+
531
+ int get_async_engine_count() const { return 0; }
529
532
530
533
/// Get the number of bytes of free and total memory on the SYCL device.
531
534
/// \param [out] free_memory The number of bytes of free memory on the SYCL device.
Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ void test() {
57
57
58
58
// CHECK: result7 = dpct::get_device(device).get_max_pitch();
59
59
cuDeviceGetAttribute (&result7,CU_DEVICE_ATTRIBUTE_MAX_PITCH, device);
60
- std::cout << " result7 " << result5 << std::endl;
60
+ std::cout << " result7 " << result7 << std::endl;
61
+
62
+ // CHECK: result8 = dpct::get_device(device).get_async_engine_count();
63
+ cuDeviceGetAttribute (&result8,CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, device);
64
+ std::cout << " result8 " << result1 << std::endl;
61
65
62
66
// CHECK: sycl::ext::oneapi::peer_access p2p_attr;
63
67
CUdevice_P2PAttribute p2p_attr;
You can’t perform that action at this time.
0 commit comments