Skip to content

Commit a46d098

Browse files
author
DvirDukhan
authored
Merge branch 'master' into serialization_and_short_reads
2 parents f6153d2 + a191e32 commit a46d098

34 files changed

+2342
-1721
lines changed

.circleci/config.yml

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ commands:
1212
- setup_remote_docker:
1313
docker_layer_caching: true
1414

15+
setup-automation:
16+
steps:
17+
- run:
18+
name: Setup automation
19+
command: |
20+
PIP=1 ./opt/readies/bin/getpy3
21+
./opt/system-setup.py
22+
1523
build-steps:
1624
parameters:
1725
platform:
@@ -25,11 +33,10 @@ commands:
2533
keys:
2634
- v1-dependencies-{{ checksum "get_deps.sh" }}
2735
# If no exact match is found will get dependencies from source
36+
- setup-automation
2837
- run:
2938
name: Install dependencies
3039
command: |
31-
./opt/readies/bin/getpy3
32-
BREW_NO_UPDATE=1 ./opt/system-setup.py
3340
./opt/readies/bin/getredis -v 6 --force
3441
./get_deps.sh cpu
3542
- save_cache:
@@ -60,8 +67,6 @@ commands:
6067
- artifacts/*.zip
6168
- artifacts/*.tgz
6269
- artifacts/*.tar
63-
# - artifacts/shapshots/*.zip
64-
# - artifacts/shapshots/*.tgz
6570
- store_artifacts:
6671
path: tests/logs
6772

@@ -98,8 +103,6 @@ commands:
98103
- artifacts/*.zip
99104
- artifacts/*.tgz
100105
- artifacts/*.tar
101-
# - artifacts/shapshots/*.zip
102-
# - artifacts/shapshots/*.tgz
103106
- store_artifacts:
104107
path: test/logs
105108

@@ -156,11 +159,10 @@ jobs:
156159
keys:
157160
- build-dependencies-{{ checksum "get_deps.sh" }}
158161
# If no exact match is found will get dependencies from source
162+
- setup-automation
159163
- run:
160164
name: Install dependencies
161165
command: |
162-
./opt/readies/bin/getpy3
163-
./opt/system-setup.py
164166
./opt/readies/bin/getredis -v 6 --valgrind --force
165167
./get_deps.sh cpu
166168
- run:
@@ -174,6 +176,34 @@ jobs:
174176
make -C opt cov-upload
175177
no_output_timeout: 30m
176178

179+
valgrind:
180+
docker:
181+
- image: redisfab/rmbuilder:6.0.5-x64-buster
182+
steps:
183+
- checkout
184+
- run:
185+
name: Submodule checkout
186+
command: git submodule update --init --recursive
187+
- restore_cache:
188+
keys:
189+
- build-dependencies-{{ checksum "get_deps.sh" }}
190+
# If no exact match is found will get dependencies from source
191+
- setup-automation
192+
- run:
193+
name: Install dependencies
194+
command: |
195+
./opt/readies/bin/getredis -v 6 --valgrind --force
196+
./get_deps.sh cpu
197+
- run:
198+
name: Build for valgrind
199+
command: |
200+
make -C opt all VALGRIND=1 SHOW=1
201+
- run:
202+
name: Test with valgrind
203+
command: |
204+
make -C opt test VALGRIND=1
205+
no_output_timeout: 120m
206+
177207
build-macos:
178208
macos:
179209
xcode: 11.3.0
@@ -322,7 +352,6 @@ on-master-and-version-tags: &on-master-and-version-tags
322352
tags:
323353
only: /^v[0-9].*/
324354

325-
326355
platform-build-defs: &platform-build-defs
327356
requires:
328357
- build-debian
@@ -362,6 +391,9 @@ workflows:
362391
- coverage:
363392
<<: *on-any-branch
364393
<<: *after-linter
394+
- valgrind:
395+
<<: *on-master
396+
<<: *after-linter
365397
- build-and-test-gpu:
366398
<<: *on-any-branch
367399
<<: *after-linter

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ RedisAI currently supports PyTorch (libtorch), Tensorflow (libtensorflow), Tenso
136136
| 0.4.0 | 1.2.0 | 1.14.0 | None | 0.5.0 |
137137
| 0.9.0 | 1.3.1 | 1.14.0 | 2.0.0 | 1.0.0 |
138138
| 1.0.0 | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
139-
| master | 1.5.0 | 1.15.0 | 2.0.0 | 1.2.0 |
139+
| master | 1.7.0 | 1.15.0 | 2.0.0 | 1.2.0 |
140140

141141
Note: Keras and TensorFlow 2.x are supported through graph freezing. See [this script](https://github.com/RedisAI/RedisAI/blob/master/tests/test_data/tf2-minimal.py) to see how to export a frozen graph from Keras and TensorFlow 2.x. Note that a frozen graph will be executed using the TensorFlow 1.15 backend. Should any 2.0 ops be not supported on the 1.15 after freezing, please open an Issue.
142142

@@ -152,4 +152,4 @@ Got questions? Feel free to ask at the [RedisAI Forum](https://forum.redislabs.c
152152

153153
Redis Source Available License Agreement - see [LICENSE](LICENSE)
154154

155-
Copyright 2020, [Tensorwerk, Inc](https://tensorwerk.com) & [Redis Labs, Inc](https://redislabs.com)
155+
Copyright 2020, [Redis Labs, Inc](https://redislabs.com)

opt/Makefile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,29 @@ export SLAVES ?= 1
231231
export AOF ?= 1
232232
export CLUSTER ?= 1
233233

234+
define UNIT_TESTS
235+
$(SHOW)echo Running unit tests ...
236+
$(SHOW)\
237+
BINDIR=$(realpath $(BINDIR)) \
238+
$(ROOT)/tests/unit/tests.sh
239+
endef
240+
241+
define FLOW_TESTS
242+
$(SHOW)echo Running flow tests ...
243+
$(SHOW)\
244+
DEVICE=$(DEVICE) \
245+
MODULE=$(realpath $(INSTALLED_TARGET)) \
246+
CLUSTER=$(CLUSTER) \
247+
GEN=$(GEN) AOF=$(AOF) SLAVES=$(SLAVES) \
248+
VALGRIND=$(VALGRIND) \
249+
$(ROOT)/tests/flow/tests.sh
250+
endef
251+
234252
unit_tests: build
235-
@echo "$(BINDIR)"
236253
$(COVERAGE_RESET)
237-
$(SHOW)\
238-
BINDIR=$(realpath $(BINDIR)) \
239-
$(ROOT)/tests/unit/tests.sh
254+
$(UNIT_TESTS)
240255
$(COVERAGE_COLLECT_REPORT)
241256

242-
243257
flow_tests: build
244258
$(COVERAGE_RESET)
245259
$(SHOW)\
@@ -250,10 +264,12 @@ flow_tests: build
250264
VALGRIND=$(VALGRIND) \
251265
REDIS=$(REDIS) \
252266
$(ROOT)/tests/flow/tests.sh
267+
253268
$(COVERAGE_COLLECT_REPORT)
254269

255270
test: build
256271
$(COVERAGE_RESET)
272+
$(UNIT_TESTS)
257273
$(SHOW)\
258274
BINDIR=$(realpath $(BINDIR)) \
259275
$(ROOT)/tests/unit/tests.sh
@@ -267,6 +283,8 @@ test: build
267283
$(ROOT)/tests/flow/tests.sh
268284
$(COVERAGE_COLLECT_REPORT)
269285

286+
#----------------------------------------------------------------------------------------------
287+
270288
valgrind:
271289
$(SHOW)$(ROOT)/tests/flow/valgrind.sh $(realpath $(INSTALLED_TARGET))
272290

opt/redis_valgrind.sup

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,28 @@
4343
Memcheck:Value8
4444
fun:lzf_compress
4545
}
46+
47+
{
48+
<dlopen>
49+
Memcheck:Leak
50+
fun:malloc
51+
...
52+
fun:dlopen@@GLIBC_2.2.5
53+
...
54+
fun:RAI_LoadBackend
55+
}
56+
57+
{
58+
<tf-operator new>
59+
Memcheck:Leak
60+
...
61+
fun:clone
62+
}
63+
64+
{
65+
<malloc>
66+
Memcheck:Leak
67+
fun:malloc
68+
...
69+
fun:clone
70+
}

opt/system-setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def fedora(self):
6666
self.install("clang")
6767
self.install_git_lfs_on_linux()
6868

69+
def linux_last(self):
70+
self.install("valgrind")
71+
6972
def macos(self):
7073
self.install_gnu_utils()
7174
self.install("git-lfs")

src/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ ADD_LIBRARY(redisai_obj OBJECT
2323
util/queue.c
2424
util/string_utils.c
2525
redisai.c
26+
command_parser.c
2627
run_info.c
2728
background_workers.c
2829
config.c
29-
dag.c
30+
DAG/dag.c
31+
DAG/dag_parser.c
32+
modelRun_ctx.c
3033
backends.c
3134
backends/util.c
3235
model.c

0 commit comments

Comments
 (0)