Skip to content

Commit 6626672

Browse files
committed
Backward compatibility for GPU - when running on GPU, use the default allocator.
2 parents 79a613a + 968a5a0 commit 6626672

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
55
-e git+https://github.com/RedisLabs/mkdocs-modules-template.git#egg=mkdocs-modules-template

src/backends/onnxruntime.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
goto error;
1414

1515
#ifdef RAI_ONNXRUNTIME_USE_CUDA
16-
#define GET_GLOBAL_ALLOCATOR
16+
#define GET_GLOBAL_ALLOCATOR \
1717
ONNX_API(ort->GetAllocatorWithDefaultOptions(&global_allocator))
1818
#else
1919
#define GET_GLOBAL_ALLOCATOR
@@ -68,7 +68,7 @@ int RAI_InitBackendORT(int (*get_api_fn)(const char *, void *)) {
6868
return REDISMODULE_OK;
6969
}
7070

71-
bool setDeviceId(const char *devicestr, OrtSessionOptions *sessionOptions, RAI_Error *error) {
71+
bool setDeviceId(const char *devicestr, OrtSessionOptions *session_options, RAI_Error *error) {
7272

7373
RAI_Device device;
7474
int64_t deviceid;

0 commit comments

Comments
 (0)