
    xKg                     p    d dl Z d dlmZ  G d de      Z G d de      ZdZdj                  e      Zd	 Z	y)
    N)LoweringErrorc                         e Zd Zd fd	Z xZS )KernelRuntimeErrorc                     || _         || _        || _        d}|| j                   | j                  | j                  fz  }t        t        |   |       y )Nz1An exception was raised in thread=%s block=%s
	%s)tidctaidmsgsuperr   __init__)selfr	   r   r   t	__class__s        U/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/cuda/errors.pyr   zKernelRuntimeError.__init__   sL    
488TZZ22 $05    )NN)__name__
__module____qualname__r   __classcell__)r   s   @r   r   r      s    6 6r   r   c                       e Zd Zy)CudaLoweringErrorN)r   r   r    r   r   r   r      s    r   r   zJhttps://numba.readthedocs.io/en/stable/cuda/kernels.html#kernel-invocationz
Kernel launch configuration was not specified. Use the syntax:

kernel_function[blockspergrid, threadsperblock](arg0, arg1, ..., argn)

See {} for help.

c                 ^    d }d| |fv rt        t               || d      }  ||d      }| |fS )zE
    Normalize and validate the user-supplied kernel dimensions.
    c                 \   t        | t        t        f      s| g} nt        |       } t        |       dkD  rt	        |d|       | D ],  }t        |t
        j                        rt        |d|        t        |       dk  r | j                  d       t        |       dk  r t        |       S )N   z/ must be a sequence of 1, 2 or 3 integers, got z% must be a sequence of integers, got    )	
isinstancetuplelistlen
ValueErrornumbersIntegral	TypeErrorappend)dimnamevs      r   	check_dimz.normalize_kernel_dimensions.<locals>.check_dim%   s    #t}-%Cs)Cs8a<)-s4 5 5Aa!1!12#'!. / /  #hlJJqM #hlSzr   Ngriddimblockdim)r    missing_launch_config_msg)r)   r*   r(   s      r   normalize_kernel_dimensionsr,       sE    
  ""233+G:.HHr   )
r!   numba.core.errorsr   RuntimeErrorr   r   _launch_help_urlformatr+   r,   r   r   r   <module>r1      sG     +6 6	 	5  F r   