Skip to content

Commit 2b8e5ba

Browse files
authored
Merge branch 'master' into lite
2 parents 9e933b2 + b3d44c3 commit 2b8e5ba

File tree

19 files changed

+594
-54
lines changed

19 files changed

+594
-54
lines changed

Dockerfile.gpu-test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ RUN echo export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-11.0/lib64
3535

3636
COPY ./opt/ opt/
3737
COPY ./tests/flow/test_requirements.txt tests/flow/
38+
COPY ./tests/flow/Install_RedisGears.sh tests/flow/
3839

3940
RUN VENV=venv FORCE=1 ./opt/readies/bin/getpy3
4041

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
mkdocs==1.0.4
2-
mkdocs-material==4.6.3
1+
mkdocs==1.1.2
2+
mkdocs-material==6.2.2
33
-e git+https://github.com/RedisLabs/mkdocs-versions-menu.git#egg=mkdocs-versions-menu
44
-e git+https://github.com/RedisLabs/mkdocs-include.git#egg=mkdocs-include
5+
-e git+https://github.com/RedisLabs/mkdocs-modules-template.git#egg=mkdocs-modules-template
56
# uncomment requirement to build LL API
67
# -e git+https://github.com/matusnovak/doxybook.git#egg=doxybook

get_deps.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ MKL=mkl
7070
ONNXRUNTIME=onnxruntime
7171

7272
######################################################################################## DLPACK
73-
73+
DLPACK_VERSION="v0.4"
7474
if [[ $WITH_DLPACK != 0 ]]; then
7575
[[ $FORCE == 1 ]] && rm -rf $DLPACK
7676

7777
if [[ ! -d $DLPACK ]]; then
7878
echo "Cloning dlpack ..."
79-
git clone --depth 1 https://github.com/dmlc/dlpack.git $DLPACK
79+
git clone --depth 1 --branch $DLPACK_VERSION https://github.com/dmlc/dlpack.git $DLPACK
8080
echo "Done."
8181
else
8282
echo "dlpack is in place."

mkdocs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,24 @@ plugins:
5353
- search
5454
- include:
5555
src_path: docs/snippets
56+
- modules-template:
57+
try-for-free: false
58+
modules:
59+
- name: 'Search'
60+
link: '/redisearch'
61+
62+
- name: 'Time Series'
63+
link: '/redistimeseries'
64+
65+
- name: 'Bloom'
66+
link: '/redisbloom'
67+
68+
- name: 'Graph'
69+
link: '/redisgraph'
70+
71+
- name: 'JSON'
72+
link: '/redisjson'
73+
74+
- name: 'Gears'
75+
link: '/redisgears'
5676
- versions-menu:

opt/redis_valgrind.sup

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,110 @@
6868
fun:RAI_LoadBackend
6969
}
7070

71+
{
72+
<ignore_py_error0>
73+
Memcheck:Cond
74+
fun:lzf_compress
75+
}
76+
{
77+
<ignore_py_error0.1>
78+
Memcheck:Cond
79+
...
80+
fun:Py_InitializeEx
81+
...
82+
}
83+
{
84+
<ignore_py_error0.2>
85+
Memcheck:Cond
86+
...
87+
fun:_PyEval_EvalFrameDefault
88+
...
89+
}
90+
{
91+
<ignore_py_error0.3>
92+
Memcheck:Leak
93+
...
94+
fun:_imp_exec_builtin
95+
...
96+
}
97+
{
98+
<ignore_py_error0.4>
99+
Memcheck:Cond
100+
...
101+
fun:PySys_SetArgvEx
102+
...
103+
}
104+
{
105+
<ignore_py_error0.5>
106+
Memcheck:Cond
107+
...
108+
fun:_PyMethodDef_RawFastCallKeywords
109+
...
110+
}
111+
{
112+
<ignore_py_error0>
113+
Memcheck:Value8
114+
fun:lzf_compress
115+
}
116+
{
117+
<ignore_py_error1>
118+
Memcheck:Addr4
119+
obj:*libpython2.7*
120+
}
121+
{
122+
<ignore_py_error1>
123+
Memcheck:Addr8
124+
obj:*libpython2.7*
125+
}
126+
{
127+
<ignore_py_error2>
128+
Memcheck:Value8
129+
obj:*libpython2.7*
130+
}
131+
{
132+
<ignore_py_error3>
133+
Memcheck:Cond
134+
obj:*libpython2.7*
135+
}
136+
{
137+
<ignore_py_error4>
138+
Memcheck:Leak
139+
...
140+
obj:*libpython2.7*
141+
...
142+
}
143+
{
144+
<ignore_libevent_issues>
145+
Memcheck:Leak
146+
...
147+
fun:redisLibeventAttach
148+
...
149+
}
150+
{
151+
<ignore_compiler_visit_expr_for_now>
152+
Memcheck:Leak
153+
...
154+
fun:compiler_visit_expr
155+
...
156+
}
157+
{
158+
<ignore_compiler_visit_expr_for_now>
159+
Memcheck:Leak
160+
...
161+
fun:redisConnectNonBlock
162+
...
163+
}
164+
{
165+
<ignore_connection_leak_for_now>
166+
Memcheck:Leak
167+
...
168+
fun:_redisContextConnectTcp
169+
...
170+
}
171+
{
172+
Libuv_epoll_ctl
173+
Memcheck:Param
174+
epoll_ctl(event)
175+
fun:epoll_ctl
176+
...
177+
}

opt/system-setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def macos(self):
7070

7171
def common_last(self):
7272
self.run("%s/bin/getclang --format" % READIES)
73-
self.run("%s/bin/getcmake" % READIES)
73+
if self.platform == "arm":
74+
self.run("%s/bin/getcmake" % READIES)
75+
else:
76+
self.run("%s/bin/getcmake --no-repo" % READIES)
7477

7578
self.run("{PYTHON} {READIES}/bin/getrmpytools".format(PYTHON=self.python, READIES=READIES))
7679

src/backends/onnxruntime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ RAI_Tensor *RAI_TensorCreateFromOrtValue(OrtValue *v, size_t batch_offset, long
172172

173173
ret = RAI_TensorNew();
174174

175-
DLContext ctx = (DLContext){.device_type = kDLCPU, .device_id = 0};
175+
DLDevice device = (DLDevice){.device_type = kDLCPU, .device_id = 0};
176176

177177
OrtTensorTypeAndShapeInfo *info;
178178
status = ort->GetTensorTypeAndShape(v, &info);
@@ -243,7 +243,7 @@ RAI_Tensor *RAI_TensorCreateFromOrtValue(OrtValue *v, size_t batch_offset, long
243243
// TODO: use manager_ctx to ensure ORT tensor doesn't get deallocated
244244
// This applies to outputs
245245

246-
ret->tensor = (DLManagedTensor){.dl_tensor = (DLTensor){.ctx = ctx,
246+
ret->tensor = (DLManagedTensor){.dl_tensor = (DLTensor){.device = device,
247247
#ifdef RAI_COPY_RUN_OUTPUT
248248
.data = data,
249249
#else

src/backends/tensorflow.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ RAI_Tensor *RAI_TensorCreateFromTFTensor(TF_Tensor *tensor, size_t batch_offset,
9090
long long batch_size) {
9191
RAI_Tensor *ret = RAI_TensorNew();
9292

93-
DLContext ctx = (DLContext){.device_type = kDLCPU, .device_id = 0};
93+
DLDevice device = (DLDevice){.device_type = kDLCPU, .device_id = 0};
9494

9595
const size_t ndims = TF_NumDims(tensor);
9696

@@ -129,7 +129,7 @@ RAI_Tensor *RAI_TensorCreateFromTFTensor(TF_Tensor *tensor, size_t batch_offset,
129129
// This applies to outputs
130130

131131
ret->tensor = (DLManagedTensor){
132-
.dl_tensor = (DLTensor){.ctx = ctx,
132+
.dl_tensor = (DLTensor){.device = device,
133133
#ifdef RAI_COPY_RUN_OUTPUT
134134
.data = data,
135135
#else

src/libtflite_c/tflite_c.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,11 @@ static DLDataType getDLDataType(const TfLiteTensor *tensor) {
4848
return dtype;
4949
}
5050

51-
static DLContext getDLContext(const TfLiteTensor *tensor, const int64_t &device_id) {
52-
DLContext ctx;
53-
ctx.device_id = device_id;
54-
// if (tensor->.is_cuda()) {
55-
// ctx.device_type = DLDeviceType::kDLGPU;
56-
// } else {
57-
// ctx.device_type = DLDeviceType::kDLCPU;
58-
// }
59-
ctx.device_type = DLDeviceType::kDLCPU;
60-
return ctx;
51+
static DLDevice getDLDevice(const TfLiteTensor *tensor, const int64_t &device_id) {
52+
DLDevice device;
53+
device.device_id = device_id;
54+
device.device_type = DLDeviceType::kDLCPU;
55+
return device;
6156
}
6257

6358
#if 0
@@ -139,10 +134,10 @@ DLManagedTensor *toManagedDLPack(std::shared_ptr<tflite::Interpreter> interprete
139134
DLDataType dtype = getDLDataType(tensor);
140135

141136
int64_t device_id = 0;
142-
DLContext ctx = getDLContext(tensor, device_id);
137+
DLDevice device = getDLDevice(tensor, device_id);
143138

144139
DLTensor dl_tensor = (DLTensor){.data = new uint8_t[tensor->bytes],
145-
.ctx = ctx,
140+
.device = device,
146141
.ndim = output_dims->size,
147142
.dtype = dtype,
148143
.shape = new int64_t[output_dims->size],

0 commit comments

Comments
 (0)