@@ -1768,7 +1768,11 @@ def test_vmm_host_modify_allocation_rejects_exportable_handle_type(init_cuda):
17681768 buf = mr .allocate (4096 )
17691769 try :
17701770 with pytest .raises (ValueError , match = "handle_type=None" ):
1771- mr .modify_allocation (buf , 2 * buf .size , config = VirtualMemoryResourceOptions (location_type = "host" ))
1771+ mr .modify_allocation (
1772+ buf ,
1773+ 2 * buf .size ,
1774+ config = VirtualMemoryResourceOptions (location_type = "host" , handle_type = VirtualMemoryHandleType .POSIX_FD ),
1775+ )
17721776 finally :
17731777 buf .close ()
17741778
@@ -3384,17 +3388,19 @@ def test_vmm_host_location_types_report_host_accessible(init_cuda, location_type
33843388 deciding the resource is not bound to a device, so is_host_accessible must
33853389 agree; otherwise a NUMA-located resource claims to be neither host- nor
33863390 device-accessible. The driver rejects an exportable handle type for HOST
3387- memory only, so the default handle type is rejected at construction for
3388- "host" and accepted for "host_numa".
3391+ memory only, so an exportable default handle type is rejected at
3392+ construction for "host" and accepted for "host_numa". The Windows
3393+ default, None, is accepted for both location types.
33893394 """
33903395 device = Device ()
33913396 device .set_current ()
33923397 numa = {"numa_id" : 0 } if location_type == "host_numa" else {}
3393- if location_type == "host" :
3398+ config = VirtualMemoryResourceOptions (location_type = location_type , ** numa )
3399+ if location_type == "host" and config .handle_type is not None :
33943400 with pytest .raises (ValueError , match = "handle_type=None" ):
3395- VirtualMemoryResource (device , config = VirtualMemoryResourceOptions ( location_type = location_type ) )
3401+ VirtualMemoryResource (device , config = config )
33963402 else :
3397- VirtualMemoryResource (device , config = VirtualMemoryResourceOptions ( location_type = location_type , ** numa ) )
3403+ VirtualMemoryResource (device , config = config )
33983404 mr = VirtualMemoryResource (
33993405 device , config = VirtualMemoryResourceOptions (location_type = location_type , handle_type = None , ** numa )
34003406 )
0 commit comments