Skip to content

Pass push_constants to function argument - #2539

Merged
asaadaldien merged 1 commit into
mainfrom
ataei-fix-dylib-invoke-abi
Jul 16, 2020
Merged

asaadaldien merged 1 commit into
mainfrom
ataei-fix-dylib-invoke-abi

Conversation

@asaadaldien

Copy link
Copy Markdown
Contributor

This fixes a segfault running resnet50 with dylib-llvm-aot backend.

@asaadaldien
asaadaldien requested review from ScottTodd and benvanik and removed request for ScottTodd July 15, 2020 22:56
Comment on lines +137 to +152
if (res->rank == 0)
res->descriptor = makeStridedMemRefDescriptor<T>(data, shape);
else if (res->rank == 1)
res->descriptor = makeStridedMemRefDescriptor<T, 1>(data, shape);
else if (res->rank == 2)
res->descriptor = makeStridedMemRefDescriptor<T, 2>(data, shape);
else if (res->rank == 3)
res->descriptor = makeStridedMemRefDescriptor<T, 3>(data, shape);
else if (res->rank == 4)
res->descriptor = makeStridedMemRefDescriptor<T, 4>(data, shape);
else if (res->rank == 5)
res->descriptor = makeStridedMemRefDescriptor<T, 5>(data, shape);
else if (res->rank == 6)
res->descriptor = makeStridedMemRefDescriptor<T, 6>(data, shape);
else
assert(false && "Unsupported 6+D memref descriptor");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert to switch statement? Or at least add braces around each block

if (res->rank == 0) {
  res->descriptor = ...
} else if (res -> rank == 1) {
...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going a way soon. Lets keep the file the same way as in llvmit/... ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@asaadaldien
asaadaldien merged commit 34476dc into main Jul 16, 2020
@asaadaldien
asaadaldien deleted the ataei-fix-dylib-invoke-abi branch July 16, 2020 19:51
@ScottTodd ScottTodd mentioned this pull request Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants