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(
12521252 {" CU_DEVICE_ATTRIBUTE_MAX_PITCH" ,
12531253 std::make_shared<EnumNameRule>(" get_max_pitch" ,
12541254 HelperFeatureEnum::device_ext)},
1255+ {" CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT" ,
1256+ std::make_shared<EnumNameRule>(" get_async_engine_count" ,
1257+ HelperFeatureEnum::device_ext)},
12551258 {" CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED" ,
12561259 std::make_shared<EnumNameRule>(
12571260 DpctGlobalInfo::usePeerAccess ()
Original file line number Diff line number Diff line change 1515#include < cstring>
1616#include < functional>
1717#include < iostream>
18+ #include < limits>
1819#include < map>
1920#include < mutex>
2021#include < set>
@@ -525,7 +526,9 @@ class device_ext : public sycl::device {
525526 return get_device_info().get_local_mem_size();
526527 }
527528
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; }
529532
530533 /// Get the number of bytes of free and total memory on the SYCL device.
531534 /// \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() {
5757
5858 // CHECK: result7 = dpct::get_device(device).get_max_pitch();
5959 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;
6165
6266 // CHECK: sycl::ext::oneapi::peer_access p2p_attr;
6367 CUdevice_P2PAttribute p2p_attr;
You can’t perform that action at this time.
0 commit comments