Skip to content

Commit dd589fa

Browse files
committed
Fixes after rebasing
1 parent 2b0fb9c commit dd589fa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/backends/torch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int RAI_ModelRunTorch(RAI_ModelRunCtx* mctx, RAI_Error *error) {
105105
}
106106

107107
for (size_t i=0 ; i<noutputs; ++i) {
108-
outputs_dl[i] = mctx->outputs[i].tensor ? &mctx->outputs[i].tensor->tensor : NULL;
108+
outputs_dl[i] = NULL;
109109
}
110110

111111
char* error_descr = NULL;

src/redisai.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
788788
}
789789

790790
RAI_Error* err = RedisModule_Calloc(1, sizeof(RAI_Error));
791-
mstime_t rtime;
791+
long long rtime;
792792
int status;
793793
RAI_ModelRunCtx* mctx = NULL;
794794
RAI_ScriptRunCtx* sctx = NULL;
@@ -804,14 +804,14 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
804804
sctx = batch_rinfo[0]->sctx;
805805
}
806806

807-
const mstime_t start = mstime();
807+
const long long start = ustime();
808808
if (mctx) {
809809
status = RAI_ModelRun(mctx, err);
810810
}
811811
else if (sctx) {
812812
status = RAI_ScriptRun(sctx, err);
813813
}
814-
rtime = mstime() - start;
814+
rtime = ustime() - start;
815815

816816
for (long long i=0; i<array_len(batch_rinfo); i++) {
817817
struct RedisAI_RunInfo *rinfo = batch_rinfo[i];
@@ -835,7 +835,7 @@ void *RedisAI_RunSession(struct RedisAI_RunInfo **batch_rinfo) {
835835
rinfo->err = RedisModule_Calloc(1, sizeof(RAI_Error));
836836
// TODO: add information on whether the call was batched
837837
// and how large the batch was
838-
rinfo->rtime = rtime;
838+
rinfo->duration_us = rtime;
839839

840840
memcpy(rinfo->err, err, sizeof(RAI_Error));
841841
if (rinfo->client != NULL) {

0 commit comments

Comments
 (0)