Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.
This repository was archived by the owner on May 9, 2024. It is now read-only.

Enable GPU scenario usage to pytests #175

@Devjiu

Description

@Devjiu

To enable usage of GPU check python/pyhdk/_sql.pyx and replace CPU to GPU.

--- a/python/pyhdk/_sql.pyx
+++ b/python/pyhdk/_sql.pyx
@@ -92,7 +92,7 @@ cdef class RelAlgExecutor:

   def execute(self, **kwargs):
     cdef const CConfig *config = self.c_rel_alg_executor.get().getExecutor().getConfigPtr().get()
-    cdef CCompilationOptions c_co = CCompilationOptions.defaults(CExecutorDeviceType.CPU)
+    cdef CCompilationOptions c_co = CCompilationOptions.defaults(CExecutorDeviceType.GPU)
     c_co.allow_lazy_fetch = kwargs.get("enable_lazy_fetch", config.rs.enable_lazy_fetch)
     c_co.with_dynamic_watchdog = kwargs.get("enable_dynamic_watchdog", config.exec.watchdog.enable_dynamic)
     cdef unique_ptr[CExecutionOptions] c_eo = make_unique[CExecutionOptions](CExecutionOptions.fromConfig(dereference(config)))

Currently pytest doesn't work with GPU and switching execution back to CPU.

This switching should be done in more convenient and general way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions