o
    8ήc4                     @   sL   d dl Zd dlmZ d dlmZmZ G dd deZedkr$e	  dS dS )    N)cuda)unittestCUDATestCasec                   @   s   e Zd Zdd ZdS )TestCudaAutoContextc                 C   sD   t jdt jd}t |}t|}|| | t || dS )zA problem was revealed by a customer that the use cuda.to_device
        does not create a CUDA context.
        This tests the problem
        
   )dtypeN)	nparangefloat32
empty_liker   	to_devicecopy_to_host
assertTrueallclose)selfAnewAdA r   V/tmp/pip-target-vg8gfxp4/lib/python/numba/cuda/tests/cudadrv/test_cuda_auto_context.pytest_auto_context   s
   


z%TestCudaAutoContext.test_auto_contextN)__name__
__module____qualname__r   r   r   r   r   r      s    r   __main__)
numpyr   numbar   numba.cuda.testingr   r   r   r   mainr   r   r   r   <module>   s    