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

Inifinite loop with -O3. #128

Closed
nomaddo opened this issue Dec 8, 2018 · 3 comments
Closed

Inifinite loop with -O3. #128

nomaddo opened this issue Dec 8, 2018 · 3 comments
Assignees
Labels

Comments

@nomaddo
Copy link
Collaborator

nomaddo commented Dec 8, 2018

The following command make an infinite loop.

$ VC4C -O3 -DLOCAL_SIZE_LIMIT=12 testing/NVIDIA/BitonicSort.cl
...
[D] Sat Dec  8 21:31:41 2018: Replaced access to memory buffer with access to VPM
[D] Sat Dec  8 21:31:41 2018: Replaced access to memory buffer with access to VPM
[D] Sat Dec  8 21:31:41 2018: Trying to lower access to shared local memory into VPM: copy i8 1 entries from (l) i32* %arrayidx50.1.1 into (l) i32* %arrayidx46.1.1
[D] Sat Dec  8 21:31:41 2018: Replaced access to memory buffer with access to VPM
[D] Sat Dec  8 21:31:41 2018: Trying to lower access to shared local memory into VPM: copy i8 1 entries from (l) i32* %arrayidx50 into (l) i32* %arrayidx46
[D] Sat Dec  8 21:31:41 2018: Trying to lower access to shared local memory into VPM: copy i8 1 entries from (l) i32* %arrayidx68 into (l) i32* %arrayidx64
....
@nomaddo nomaddo added the bug label Dec 8, 2018
@nomaddo
Copy link
Collaborator Author

nomaddo commented Dec 8, 2018

The problem is inifinite loop in the following code:

while(it != memoryInstructions.end())

In case of case MemoryOperation::COPY: in line 1385, and break in line 1394, it is not incremented at all. Then it loops forever.

I am not sure what should do here. Can you fix it? @doe300

@doe300
Copy link
Owner

doe300 commented Dec 8, 2018

True, there is a TODO where probably either something should be done or at least an exception thrown. This should probably be fixed with #120.
@nomaddo, on what kernel/test do you get the loop?

@nomaddo
Copy link
Collaborator Author

nomaddo commented Dec 9, 2018

I'm sorry, I missed the file name. bitonicMergeLocal in NVIDIA/BItnicSort.cl .

doe300 added a commit that referenced this issue Dec 15, 2018
* fixes error in compressing work-group locals
* optimizes intrisics of local ids and sizes
* command-line options can now parse all optimizations
* annotates the VideoCore documentation with some errata
* combined operations make sure flag is set on add ALU
* fixes infinite loop, see #128
@doe300 doe300 self-assigned this Dec 15, 2018
@doe300 doe300 closed this as completed Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants