Skip to content

Commit

Permalink
Fix: Rename DLContext to DLDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Apr 14, 2021
1 parent b631cef commit 1a3068f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def generateTargetCode(outFileName, graph, params, modelInfo):
DLTensor input;
input.data = (void*)data[index];
DLContext ctx = {kDLCPU, 0};
input.ctx = ctx;
DLDevice device = {kDLCPU, 0};
input.device = device;
input.ndim = ${inNDims};
input.dtype = dtypes[index];
input.shape = shapes[index];
Expand All @@ -111,8 +111,8 @@ def generateTargetCode(outFileName, graph, params, modelInfo):
DLTensor output;
output.data = (void*)data[index];
DLContext ctx = {kDLCPU, 0};
output.ctx = ctx;
DLDevice device = {kDLCPU, 0};
output.device = device;
output.ndim = ${outNDims};
output.dtype = dtypes[index];
output.shape = shapes[index];
Expand Down

0 comments on commit 1a3068f

Please sign in to comment.