py-cpuinfo icon indicating copy to clipboard operation
py-cpuinfo copied to clipboard

Add support for CPU ISA `loongarch`

Open willliu opened this issue 4 years ago • 5 comments

Dear community, this PR includes update with support for the loongarch architecture.

All tests passed, and verified on a native machine.

cpuinfo.get_cpu_info()

{'python_version': '3.7.3.final.0 (64 bit)', 'cpuinfo_version': [8, 0, 0], 'cpuinfo_version_string': '8.0.0', 'arch': 'LOONG_64', 'bits': 64, 'count': 4, 'arch_string_raw': 'loongarch64' ...}

p.s. this is intended for a later update for conda to support loongarch, as discussed here conda/conda#10866

willliu avatar Aug 19 '21 10:08 willliu

I don't have a loongarch CPU to test this on. Can you add a test to the test suite that verifies that this works?

workhorsy avatar Sep 20 '21 18:09 workhorsy

@workhorsy New updates and test file provided. The conflicts happened because of the RISC-V support is recently added, now resolved as following:

  1. cpuinfo/cpuinfo.py: update the content around line 374, add contents around line 851
  2. test_suite.py: add the content around line 61
  3. tests/test_invalid_cpu.py: add the content around line 36

If necessary, willing to open a new pull request and modify from the current master branch, but may need some time (to carefully update the current fork).

willliu avatar Sep 20 '21 23:09 willliu

If you want, you can update the current pull request, or make a new one. Thanks.

workhorsy avatar Oct 02 '21 12:10 workhorsy

@workhorsy Good, being new to the git tools, may need some time to start a new pull request.

willliu avatar Oct 02 '21 14:10 willliu

@jezdez Yes, there seem to be some careful search about Loongson ISA to be done before a new pull request.

willliu avatar Feb 19 '22 03:02 willliu

how is the progress? @willliu @workhorsy

cheungxi avatar Nov 04 '22 14:11 cheungxi

@cheungxi please refer to https://github.com/conda/conda/pull/11956 , the owner of which is not taking over this issue

willliu avatar Nov 04 '22 15:11 willliu

@cheungxi please refer to conda/conda#11956 , the owner of which is not taking over this issue

@willliu Can I be a collaborator for your repository

cheungxi avatar Nov 04 '22 15:11 cheungxi

Hi, I've cleaned up the code here and submitted #194 (with your author info retained of course). Would you mind reviewing that PR, and if it's okay to you, close this PR or just reset your branch to HEAD of mine? The commit history of this branch is a bit too messy for upstreaming.

xen0n avatar Nov 18 '22 06:11 xen0n

I'm going to close this PR for now, as #194 solves this problem. Feel free to make more PRs or reopen it. Thanks for your help everyone.

workhorsy avatar Nov 19 '22 20:11 workhorsy

@xen0n Just see the notification of this PR, favoring your way of opening #194 to make this issue solved. @workhorsy Sure, glad to see this issue closed by #194.

willliu avatar Nov 20 '22 00:11 willliu