inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.05k stars 240 forks source link

SVM Memory Pool #587

Closed matthiasdiener closed 2 years ago

matthiasdiener commented 2 years ago

PR on top of #452


This currently fails with

File "/shared/home/mdiener/Work/emirge/grudge/examples/wave/wave-op-mpi.py", line 351, in <module>
    main(cl.create_some_context,
  File "/shared/home/mdiener/Work/emirge/grudge/examples/wave/wave-op-mpi.py", line 213, in main
    allocator=cl_tools.SVMMemoryPool(cl_tools.SVMAllocator(cl_ctx, cl.svm_mem_flags.READ_WRITE, queue=queue)),
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. pyopencl._cl.SVMMemoryPool(allocator: pyopencl._cl._tools_SVMAllocator, leading_bits_in_bin_id: int = 4)

Invoked with: <pyopencl.tools.SVMAllocator object at 0x7fadda3eb940>

cc @inducer @lukeolson

inducer commented 2 years ago

Saw that you started working on this. I'd been working on this, too. I just pushed my WIP work to #452, in some ways similar to what you have here. FWIW, what's there doesn't even compile yet, but I figured it'd be better to share than not.

inducer commented 2 years ago

(And sorry about the duplication of work!)

matthiasdiener commented 2 years ago

Closing since #452 already has an SVM pool now.