• Lei Wang's avatar
    [Enhancement] Simplify kernel source extraction in JIT adapters (#230) · 622fa042
    Lei Wang authored
    * [Enhancement] Simplify kernel source extraction in JIT adapters
    
    - Updated CtypesKernelAdapter and CythonKernelAdapter to include kernel_global_source for improved source code retrieval.
    - Modified the _legalize_result_idx method in BaseKernelAdapter to accept Optional[List[int]] for better flexibility.
    - Added comments to clarify the purpose of kernel_global_source in both adapters, enhancing code readability and maintainability.
    
    * [Refactor] Update parameter type in CythonKernelAdapter constructor
    
    - Changed the parameter type from List[TensorType] to List[KernelParam] in the CythonKernelAdapter's __init__ method to enhance type consistency and align with recent refactoring efforts across modules.
    622fa042
adapter.py 13.3 KB