Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulation crashes caused by empty array labels in host memory operations #43

Open
xyzsam opened this issue Oct 21, 2021 · 0 comments
Open
Assignees

Comments

@xyzsam
Copy link
Member

xyzsam commented Oct 21, 2021

Cross-posting from harvard-acc/smaug#102, as this is mainly an Aladdin bug, not a SMAUG bug. The reason is this: typically, we store the name of the array being dereferenced in the array_label field of ExecNode. This works fine for very simple code, but it breaks down very easily. In this particular case, we have a hostLoad operation, which is not treated like a normal load or store:

  1. For hostLoad and hostStore operations, we don't fill in an array name in the ExecNode in the first place: link. Unlike normal loads and stores from a scratchpad or cache, these are bulk transfer operations which have two addresses (source and dest), and it's not obvious which one the array_label would refer to.
  2. Even if we had filled in one of these, it wouldn't be guaranteed to work. The compiler can insert additional operations like bitcasts or phis which effectively cause the array to be renamed in the trace to something like add.ptr13 rather than orig_function_param_name. Again, this is a fundamental problem of Aladdin's reliance on variable names, which has caused no end of issues like this and resulted in numerous band-aid solutions that only partially solve the problem (such as the "forward" parameters in function calls).

The only reliable way to address this is to use the address itself as the lookup key and find the array whose address range covers that key.

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

No branches or pull requests

1 participant