c11_atomics: Hardcoded startValue (1234) causes svm_atomic_exchange test case to fail

Open Beginner friendly
#2,882 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
61/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
testing

Research direction

Locate the c11_atomics SVM test case svm_atomic_exchange and inspect how it initializes startValue and checks oldValues plus destMemory. Reproduce the case with more than 1234 threads; it is done when the valid duplicate value 1234 is no longer reported as a failure and the test still detects other incorrect value counts.

Written by the indexing model from the issue text.

Description

cognizant-backlog

1,For the SVM variant with memory_scope_all_svm_devices (or all_devices, or gHost),
threadCount is default device_thread number (1024) + host_thread number.
If the host threads number is bigger than 210, the threadCount will be
more than 1234.

2,After all threads finish, the threadCount + 1 values (oldValues[0..threadCount-1]
plus destMemory[0]) always hold each tid in {0 .. threadCount-1} once, plus the start
value 1234 once.

When threadCount > 1234, tid 1234 is also a valid value. So 1234 correctly shows up
twice: once as the original start value and once as thread 1234's tid.

This duplicate occurrence is incorrectly flagged as a test failure.
Dominant language
C++
Stars
234
Forks
240
Avg merge
6d 12h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from KhronosGroup/OpenCL-CTS

All issues in KhronosGroup/OpenCL-CTS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.