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

feat: Support Moore Threads GPU #1142

Merged
merged 4 commits into from
Aug 2, 2024
Merged

feat: Support Moore Threads GPU #1142

merged 4 commits into from
Aug 2, 2024

Conversation

yeahdongcn
Copy link
Contributor

@yeahdongcn yeahdongcn commented Aug 2, 2024

Testing done:

❯ ./fastfetch --gpu-driver-specific
                            ....
              .',:clooo:  .:looooo:.           xiaodongye@xiaodongye-s80
           .;looooooooc  .oooooooooo'          -------------------------
        .;looooool:,''.  :ooooooooooc          OS: Ubuntu focal 20.04 x86_64
       ;looool;.         'oooooooooo,          Kernel: Linux 5.4.0-42-generic
      ;clool'             .cooooooc.  ,,       Uptime: 17 days, 21 hours, 8 mins
         ...                ......  .:oo,      Packages: 1838 (dpkg), 45 (nix-user), 9 (snap)
  .;clol:,.                        .loooo'     Shell: zsh 5.8
 :ooooooooo,                        'ooool     Display (Virtual-1): 1920x1080
'ooooooooooo.                        loooo.    Terminal: node
'ooooooooool                         coooo.    CPU: 12th Gen Intel(R) Core(TM) i5-12400 (12) @ 4.40 GHz
 ,loooooooc.                        .loooo.    GPU: Moore Threads MTT S80 @ 1.80 GHz (11.62 MiB / 16.00 GiB, 0%) [Discrete]
   .,;;;'.                          ;ooooc     Memory: 4.97 GiB / 31.11 GiB (16%)
       ...                         ,ooool.     Swap: 51.26 MiB / 976.00 MiB (5%)
    .cooooc.              ..',,'.  .cooo.      Disk (/): 865.21 GiB / 914.46 GiB (95%) - ext4
      ;ooooo:.           ;oooooooc.  :l.       Local IP (enp5s0): 192.168.4.137/23
       .coooooc,..      coooooooooo.           Locale: en_US.UTF-8
         .:ooooooolc:. .ooooooooooo'
           .':loooooo;  ,oooooooooc                                    
               ..';::c'  .;loooo:'                                     

❯ ./fastfetch --gpu-temp
                            ....
              .',:clooo:  .:looooo:.
           .;looooooooc  .oooooooooo'          xiaodongye@xiaodongye-s80
        .;looooool:,''.  :ooooooooooc          -------------------------
       ;looool;.         'oooooooooo,          OS: Ubuntu focal 20.04 x86_64
      ;clool'             .cooooooc.  ,,       Kernel: Linux 5.4.0-42-generic
         ...                ......  .:oo,      Uptime: 17 days, 20 hours, 52 mins
  .;clol:,.                        .loooo'     Packages: 1838 (dpkg), 45 (nix-user), 9 (snap)
 :ooooooooo,                        'ooool     Shell: zsh 5.8
'ooooooooooo.                        loooo.    Display (Virtual-1): 1920x1080
'ooooooooool                         coooo.    Terminal: node
 ,loooooooc.                        .loooo.    CPU: 12th Gen Intel(R) Core(TM) i5-12400 (12) @ 4.40 GHz
   .,;;;'.                          ;ooooc     GPU: Moore Threads MTT S80 - 56.0°C [Discrete]
       ...                         ,ooool.     Memory: 4.78 GiB / 31.11 GiB (15%)
    .cooooc.              ..',,'.  .cooo.      Swap: 51.26 MiB / 976.00 MiB (5%)
      ;ooooo:.           ;oooooooc.  :l.       Disk (/): 865.20 GiB / 914.46 GiB (95%) - ext4
       .coooooc,..      coooooooooo.           Local IP (enp5s0): 192.168.4.137/23
         .:ooooooolc:. .ooooooooooo'           Locale: en_US.UTF-8
           .':loooooo;  ,oooooooooc
               ..';::c'  .;loooo:'                                     
                                                                       

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Is 0.00 GHz desired? Does --gpu-temp work?

@yeahdongcn
Copy link
Contributor Author

Is 0.00 GHz desired? Does --gpu-temp work?

--gpu-temp works fine:

GPU: Moore Threads Device 0201 (VGA compatible) - 56.0°C [Discrete]

Let me check the 0.00 GHz.

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Please also check if /usr/share/hwdata/pci.ids contains the MT GPU model you use. If not, you may want to manually update it.

image

@yeahdongcn
Copy link
Contributor Author

OK. Just replace the file from https://pci-ids.ucw.cz/, correct?

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

yeah

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

I have added FFGpuDriverResult::name in case users' pci.ids doesn't contain their GPU models. Please do if for MT too

Signed-off-by: Xiaodong Ye <[email protected]>
@yeahdongcn
Copy link
Contributor Author

I have added FFGpuDriverResult::name in case users' pci.ids doesn't contain their GPU models. Please do if for MT too

Done.

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Good. I'll do some cleanups and port the code to Windows. It would be helpful if you can find someone to test it

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

I assume the dll name is mtml.dll right?

@CarterLi CarterLi merged commit d96d794 into fastfetch-cli:dev Aug 2, 2024
15 checks passed
@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Can you test this? 1a66bc4

@yeahdongcn
Copy link
Contributor Author

Can you test this? 1a66bc4

Works well on Linux.

@yeahdongcn
Copy link
Contributor Author

yeahdongcn commented Aug 2, 2024

But I'm afraid MTGPU drivers haven't officially announced they support BSD.

@yeahdongcn
Copy link
Contributor Author

I assume the dll name is mtml.dll right?

Yes (just confirmed internally).

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

祝国产越来越好!

@yeahdongcn
Copy link
Contributor Author

Can you test this? 1a66bc4

Screenshot 2024-08-02 at 17 27 54

Also looks good on Windows!

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Can you test this? 1a66bc4

Screenshot 2024-08-02 at 17 27 54

Also looks good on Windows!

You must specify --gpu-driver-specific to let fastfetch call gpu driver

@yeahdongcn
Copy link
Contributor Author

Can you test this? 1a66bc4

Screenshot 2024-08-02 at 17 27 54 Also looks good on Windows!

You must specify --gpu-driver-specific to let fastfetch call gpu driver

Screenshot 2024-08-02 at 17 57 22

A segmentation fault occurs at the end.

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

What if you remove the atexit?

@yeahdongcn
Copy link
Contributor Author

What if you remove the atexit?

Screenshot 2024-08-02 at 18 10 59

I opened a JIRA internally.

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Nice

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

Wait. Unlike nvmlShutdown, mtmlLibraryShutDown requires a parameter MtmlLibrary *lib

@CarterLi
Copy link
Member

CarterLi commented Aug 2, 2024

a856350

@yeahdongcn
Copy link
Contributor Author

yeahdongcn commented Aug 2, 2024

a856350

My bad. Thanks for fixing this.

Verified on Windows, the panic is gone.

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