Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
48213b4
Initial support for Numpy ndarray subclasses.
Aug 18, 2020
3a89799
PyType to py_type
DrTodd13 Aug 24, 2020
46a4b6f
Implementation of USM-backed ndarray as dparray.
DrTodd13 Sep 20, 2020
e12ea86
Initial implementation of custom allocator support.
DrTodd13 Sep 20, 2020
765d8fa
Add some testing code for dparray but this isn't integrated with the …
DrTodd13 Sep 20, 2020
42ff174
Initial support for Numpy ndarray subclasses.
Aug 18, 2020
f07879b
PyType to py_type
DrTodd13 Aug 24, 2020
fdab211
Implementation of USM-backed ndarray as dparray.
DrTodd13 Sep 20, 2020
390e679
Initial implementation of custom allocator support.
DrTodd13 Sep 20, 2020
9a271b2
Add some testing code for dparray but this isn't integrated with the …
DrTodd13 Sep 20, 2020
a2d6403
Remove debug prints.
DrTodd13 Sep 29, 2020
6f2bcf5
Move np.ones_like to decorator like empty_like and zeros_like.
DrTodd13 Sep 29, 2020
ea0747f
Define a module for the USM-allocator for dparray.
DrTodd13 Sep 29, 2020
547ae8d
Add an external_allocator options to the Numba runtime.
DrTodd13 Sep 29, 2020
d8fc51a
Compile the new dppl_rt extension module.
DrTodd13 Sep 29, 2020
d89b613
Most NumPy functions are now imported into dparray module and the typ…
DrTodd13 Sep 29, 2020
e1f9a9f
Merge branch 'numpy_subclass' of https://github.com/IntelPython/numba…
DrTodd13 Sep 29, 2020
55e61c3
Fix NRT_Allocate signature issue.
DrTodd13 Sep 30, 2020
3cbf1c6
Switch to dpctl.
DrTodd13 Sep 30, 2020
699a8bf
Switch to dpctl.
DrTodd13 Sep 30, 2020
aa945b9
Register dparray typing and lowering functions in a better spot so no…
DrTodd13 Sep 30, 2020
107f9c3
Give dparray's an empty dict for __array_interface. We can gradually…
DrTodd13 Oct 1, 2020
ccafc8e
Add support for attribute typing so things like array.T (transpose) n…
DrTodd13 Oct 3, 2020
f954be9
Don't redefine symbol if we specifically overloaded it prior.
DrTodd13 Nov 4, 2020
0ad853a
Merge remote-tracking branch 'origin' into numpy_subclass
DrTodd13 Nov 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Switch to dpctl.
  • Loading branch information
DrTodd13 committed Sep 30, 2020
commit 3cbf1c68215386161fd02edf06b9dff41ddfa369
2 changes: 1 addition & 1 deletion numba/dppl/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from types import FunctionType
from inspect import signature

import dppl.ocldrv as driver
import dpctl.ocldrv as driver
from . import spirv_generator

import os
Expand Down
2 changes: 1 addition & 1 deletion numba/dppl/device_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from . import initialize

from .decorators import kernel, func, autojit
from dppl.ocldrv import runtime
from dpctl.ocldrv import runtime
from . import target


Expand Down
2 changes: 1 addition & 1 deletion numba/dppl/dppl_host_fn_call_gen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import print_function, division, absolute_import

import dppl.ocldrv as driver
import dpctl.ocldrv as driver
import llvmlite.llvmpy.core as lc
import llvmlite.ir.values as liv
import llvmlite.ir as lir
Expand Down
2 changes: 1 addition & 1 deletion numba/dppl/dppl_lowerer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from .target import SPIR_GENERIC_ADDRSPACE
from .dufunc_inliner import dufunc_inliner
from . import dppl_host_fn_call_gen as dppl_call_gen
import dppl.ocldrv as driver
import dpctl.ocldrv as driver
from numba.dppl.target import DPPLTargetContext


Expand Down
25 changes: 21 additions & 4 deletions numba/dppl/dppl_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,29 @@ NRT_ExternalAllocator dparray_allocator;

void dparray_memsys_init() {
void *(*get_queue)();
void *sycldl = dlopen("libDPPLSyclInterface.so", RTLD_NOW);
char *lib_name = "libDPPLSyclInterface.so";
char *malloc_name = "DPPLmalloc_shared";
char *free_name = "DPPLfree_with_queue";
char *get_queue_name = "DPPLQueueMgr_GetCurrentQueue";

void *sycldl = dlopen(lib_name, RTLD_NOW);
assert(sycldl != NULL);
dparray_allocator.malloc = (NRT_external_malloc_func)dlsym(sycldl, "DPPLmalloc_shared");
dparray_allocator.malloc = (NRT_external_malloc_func)dlsym(sycldl, malloc_name);
if (dparray_allocator.malloc == NULL) {
printf("Did not find %s in %s\n", malloc_name, lib_name);
exit(-1);
}
dparray_allocator.realloc = NULL;
dparray_allocator.free = (NRT_external_free_func)dlsym(sycldl, "DPPLfree");
get_queue = (void *(*))dlsym(sycldl, "DPPLGetCurrentQueue");
dparray_allocator.free = (NRT_external_free_func)dlsym(sycldl, free_name);
if (dparray_allocator.free == NULL) {
printf("Did not find %s in %s\n", free_name, lib_name);
exit(-1);
}
get_queue = (void *(*))dlsym(sycldl, get_queue_name);
if (get_queue == NULL) {
printf("Did not find %s in %s\n", get_queue_name, lib_name);
exit(-1);
}
dparray_allocator.opaque_data = get_queue();
// printf("dparray_memsys_init: %p %p %p\n", dparray_allocator.malloc, dparray_allocator.free, dparray_allocator.opaque_data);
}
Expand Down
2 changes: 1 addition & 1 deletion numba/dppl_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dppl_present = False

try:
from dppl.ocldrv import *
from dpctl.ocldrv import *
except:
pass
else:
Expand Down