Skip to content

Commit

Permalink
Changes required for order 8 to work
Browse files Browse the repository at this point in the history
  • Loading branch information
vikaskurapati committed Apr 10, 2024
1 parent b4f17fa commit 5cb3ecf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions yateto/codegen/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def temporary(self, bufname, size, iniZero=False, memory=list()):

if self._target == 'cpu':
if self._arch.onHeap(size):
if memory:
raise NotImplementedError('Direct temporary initialization is not supported for heap-allocated memory.')
if len(self._freeList) == 0:
self._cpp('int {};'.format(self.ERROR_NAME))
self._cpp('{}* {};'.format(self._arch.typename, bufname))
Expand All @@ -42,6 +40,9 @@ def temporary(self, bufname, size, iniZero=False, memory=list()):
size,
self._arch.typename))
if iniZero:
if memory:
for i, data in enumerate(memory):
self._cpp(f'{bufname}[{i}] = {data};')
self._cpp.memset(bufname, size, self._arch.typename)
self._freeList.append(bufname)
else:
Expand Down
2 changes: 1 addition & 1 deletion yateto/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __processMatrix(name, shape, entries, clones, transpose, alignStride, namesp
'Please, check your input file and rename')

matrices[name] = Tensor(name=name,
shape=shape,
shape=tuple(shape),
spp=mtx,
alignStride=alignStride(name),
namespace=namespace)
Expand Down

0 comments on commit 5cb3ecf

Please sign in to comment.