
    `i1                         d dl Z d dlmZ d dlmZ d dlmZmZ d dlm	Z	  G d de          Z
edk    r ej                     dS dS )	    N)cuda)driver)unittestContextResettingTestCase)Queuec                       e Zd Zd ZdS )TestResetDevicec                 t   d }t                      }t          j        ||f          }|                                 |                                 g }|                                s;|                    |                                           |                                ;|                     |g            d S )Nc                    	 t          t          j                              }t          d          D ].}|D ])}t          j        |           t          j                     */d S # t          $ r }|                     |           Y d }~d S d }~ww xY w)N   )ranger   get_device_countr   select_deviceclose	Exceptionput)exception_queuedevices_des        ~/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/numba/cuda/tests/cudadrv/test_reset_device.py	newthreadz4TestResetDevice.test_reset_device.<locals>.newthread   s    ' 7 9 9::q % %A$ % %*1---
%% %  ' ' '##A&&&&&&&&&'s   AA" "
B,BB)targetargs)	r   	threadingThreadstartjoinemptyappendgetassertEqual)selfr   r   t
exceptionss        r   test_reset_devicez!TestResetDevice.test_reset_device	   s    	' 	' 	'  ''I_4FGGG					
!'')) 	5o1133444 "'')) 	5R(((((    N)__name__
__module____qualname__r'    r(   r   r	   r	      s#        ) ) ) ) )r(   r	   __main__)r   numbar   numba.cuda.cudadrv.driverr   numba.cuda.testingr   r   queuer   r	   r)   mainr,   r(   r   <module>r3      s              , , , , , , A A A A A A A A      ) ) ) ) ). ) ) )6 zHMOOOOO r(   