Skip to content

minor bugfixes & improvements#2624

Open
franz wants to merge 8 commits intoKhronosGroup:mainfrom
franz:fixes
Open

minor bugfixes & improvements#2624
franz wants to merge 8 commits intoKhronosGroup:mainfrom
franz:fixes

Conversation

@franz
Copy link
Contributor

@franz franz commented Feb 27, 2026

No description provided.

@franz
Copy link
Contributor Author

franz commented Mar 16, 2026

@bashbaug I have added one more commit that fixes an issue with run_conformance.py script

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

Thanks, this mostly LGTM. There are a few places where it would be good to get additional working group input before merging, though.

@franz do you have a timeframe where you need these changes merged?

Comment on lines +545 to +546
/* "signed" and "unsigned" type names are valid (int is implied) */
if (arg_type.find("signed") != std::string::npos)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this guaranteed to be valid? Neither signed nor unsigned (without the int) are listed in https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#built-in-scalar-data-types.

Copy link
Contributor Author

@franz franz Mar 17, 2026

Choose a reason for hiding this comment

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

OK, i didn't check the list of the builtin scalar data types; however, in the code of the test, there is "signed" and "unsigned" (both without int) in the std::vector returned from method generate_all_type_arguments(cl_device_id device) and then the code calls get_param_size on each element of that vector.

I don't remember exactly, but IIRC the problem was that the get_param_size returned 0 for both these "implied int" types, and as a result total_param_size was miscalculated by 8 bytes, which then triggered an error because the actual total size of arguments was over limit, when used with SPIR-V compilation mode. IIRC Clang doesn't really care about PoCL's argument-related limits, so it will accept larger actual arguments, but the SPIRV translation path isn't so forgiving. I could try to recreate the error & get more details if you'd like.

Comment on lines +271 to +272
if result == 0 or result == 2 or result == -100:
log_file.write(" (" + get_time() + ") Test " + test_name + " passed in " + str(run_time) + "s\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

Interested in feedback from others in the working group: Should we log test skips separately? Or is it OK to log these the same as a passing test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realized it's currently inconsistent, so I updated it print skipping separately from passing in both places where it's printed.

@franz
Copy link
Contributor Author

franz commented Mar 17, 2026

@franz do you have a timeframe where you need these changes merged?

Actually PR #2614 is more important for us right now. Without it, OpenCL-CTS doesn't even build on RISCV.

franz and others added 7 commits March 17, 2026 23:36
If the queried type was "signed" or "unsigned" (with an implied int),
the returned size was zero.
"consistency_il_programs" test was using bogus SPIRV input. However,
clCreateProgramWithIL() must return CL_INVALID_VALUE for invalid SPIRV:

... CL_INVALID_VALUE if the length-byte block of memory pointed to by 'il' does not contain well-formed
intermediate language input that can be consumed by the OpenCL runtime.

therefore the test was triggering two different error conditions
(with different error values) simultaneously. Accept both error
values.
KhronosGroup#2454
added a REQUIRE_EXTENSION("cl_khr_spir"); which returns
-100 (TEST_SKIPPED_ITSELF) when the device doesn't have the extension.
The run_conformance.py considers all nonzero values
to be errors. This fixes the runner script to accept
SKIP values too.
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.

2 participants