Skip to content

Fix Unisoc T618 Chipset Detection #307

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bc-lee
Copy link

@bc-lee bc-lee commented Jul 7, 2025

Add support for uppercase "UNISOC T" prefix in match_t function to handle devices like Samsung Galaxy Tab A8 (SM-X205N) that report "UNISOC T618" instead of the expected mixed-case "Unisoc T618".

The function now explicitly matches both variants:

  • "Unisoc T" (mixed case, existing)
  • "UNISOC T" (uppercase, new)

This ensures proper chipset vendor detection on affected Samsung devices where the uppercase variant caused match failures.

Includes test case for "UNISOC T618" detection.
Fixes #306

Add support for uppercase "UNISOC T" prefix in `match_t` function to handle
devices like Samsung Galaxy Tab A8 (SM-X205N) that report "UNISOC T618"
instead of the expected mixed-case "Unisoc T618".

The function now explicitly matches both variants:
- "Unisoc T" (mixed case, existing)
- "UNISOC T" (uppercase, new)

This ensures proper chipset vendor detection on affected Samsung devices
where the uppercase variant caused match failures.

Includes test case for "UNISOC T618" detection.
@facebook-github-bot
Copy link
Contributor

Hi @bc-lee!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Copy link
Collaborator

@fbarchard fbarchard left a comment

Choose a reason for hiding this comment

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

Change looks okay and consistent with documentation I find on Galaxy Tab A8

With this change does T618 fill in chipset->model correctly?
Does the T618 require any ISA override? Example vudot is problematic on T310
https://github.com/pytorch/cpuinfo/blob/main/src/arm/linux/aarch32-isa.c#L148-L151

@bc-lee
Copy link
Author

bc-lee commented Jul 7, 2025

I checked out XNNPACK and built and ran all tests on my T618 device. Fortunately, I didn’t encounter any SIGILL issues.

The only failures were a few numerical differences in the f32-vgelu-test, and only in the scalar mode—not in the NEON paths. I don't think this is significant, and I believe we don't need to worry about scalar-only cases in cpuinfo.

For reference, here’s an example output from one of the failing scalar-mode tests:

[ RUN      ] xnn_f32_vgelu_ukernel__scalar_rational_12_10_div_u8.inplace
/path/to/XNNPACK/./test/vunary-microkernel-tester.h:187: Failure
The difference between x[i] and y_ref[i] is 1.4374899101991961e-06, which exceeds test_info.Tolerance(y_ref[i], xnn_datatype_of<Out>()), where
x[i] evaluates to -1.437489913769241e-06,
y_ref[i] evaluates to -3.5700448199342712e-15, and
test_info.Tolerance(y_ref[i], xnn_datatype_of<Out>()) evaluates to 1.1920928955078125e-06.
at 0 / 1, x[0] = -8.03902626037597656e+00
Google Test trace:
/path/to/XNNPACK/./test/replicable_random_device.h:79: To replicate this failure, re-run the test with `--gunit_random_seed=54411`.

/path/to/XNNPACK/./test/vunary-microkernel-tester.h:187: Failure
The difference between x[i] and y_ref[i] is 1.4374899101991961e-06, which exceeds test_info.Tolerance(y_ref[i], xnn_datatype_of<Out>()), where
x[i] evaluates to -1.437489913769241e-06,
y_ref[i] evaluates to -3.5700448199342712e-15, and
test_info.Tolerance(y_ref[i], xnn_datatype_of<Out>()) evaluates to 1.1920928955078125e-06.
at 1 / 8, x[1] = -8.03902626037597656e+00
Google Test trace:
/path/to/XNNPACK/./test/replicable_random_device.h:79: To replicate this failure, re-run the test with `--gunit_random_seed=54411`.

[  FAILED  ] xnn_f32_vgelu_ukernel__scalar_rational_12_10_div_u8.inplace (0 ms)

If you have other good ways to validate the instruction set on this device, please let me know.

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.

Chipset Vendor Detection Failure on Unisoc T618
3 participants