Does Freecad use GPU?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Does Freecad use GPU?

Post by wmayer »

alex wrote:OK FreeCAD doesn't, but Coin3D lib does use it right ?
In a way it uses the GPU but it don't think Coin3d uses it directly but the graphic driver does. Coin3d itself actually uses OpenGL.
bambuko wrote: Can you please, possibly point to somewhere where this is explained in more detail?
No idea what you want to hear. All what I can do is giving you a WP article about this topic: https://en.wikipedia.org/wiki/General-p ... sing_units
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Does Freecad use GPU?

Post by Laurie Hartley »

I have two Laptops -
one Thinkpad E595 with onboard graphics purchased last year and
one Dell XPS with an Nvidia graphics card bought about 10 years ago.

The only difference I can notice between the two of them is the Dell takes a bit longer to load FreeCAD. When opening my largest FreeCAD file there is no noticeable difference. I have attached some information below to make a comparison which you may find useful.

OS: Debian GNU/Linux 10 (buster) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 9162733)
Hash: 91627338a44371fe9a8e815b4900f62558af98a1
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/Australia (en_AU)

THINKPAD SPECS

Code: Select all

System:    Kernel: 5.14.0-3mx-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.14.0-3mx-amd64 
           root=UUID=<filter> ro splash quiet 
           Desktop: Xfce 4.14.2 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm 4.14.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-19.4_ahs_x64 patito feo March 31  2021 
           base: Debian GNU/Linux 10 (buster) 
Machine:   Type: Laptop System: LENOVO product: 20NFA00PAU v: ThinkPad E595 serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 20NFA00PAU serial: <filter> UEFI: LENOVO v: R11ET40W (1.20 ) 
           date: 11/17/2020 
Battery:   ID-1: BAT0 charge: 42.7 Wh (100.0%) condition: 42.7/45.7 Wh (93.4%) volts: 11.7 
           min: 11.1 model: Celxpert 5B10W138 type: Li-poly serial: <filter> status: Full 
           cycles: 10 
CPU:       Info: Quad Core model: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx bits: 64 
           type: MT MCP arch: Zen family: 17 (23) model-id: 18 (24) stepping: 1 
           microcode: 8108102 cache: L2: 2 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 36731 
           Speed: 1177 MHz min/max: 1400/2300 MHz boost: enabled Core speeds (MHz): 1: 1177 
           2: 1179 3: 1221 4: 1222 5: 1397 6: 1397 7: 1308 8: 1376 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Picasso vendor: Lenovo ThinkPad E595 driver: amdgpu v: kernel 
           bus-ID: 05:00.0 chip-ID: 1002:15d8 class-ID: 0300 
           Device-2: IMC Networks type: USB driver: uvcvideo bus-ID: 3-2:3 chip-ID: 13d3:5415 
           class-ID: 0e02 
           Display: x11 server: X.Org 1.20.10 compositor: xfwm4 v: 4.14.0 driver: loaded: amdgpu 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x285mm (40.0x11.2") 
           s-diag: 1055mm (41.5") 
           Monitor-1: eDP res: 1920x1080 hz: 60 dpi: 142 size: 344x194mm (13.5x7.6") 
           diag: 395mm (15.5") 
           Monitor-2: HDMI-A-0 res: 1920x1080 hz: 60 dpi: 30 size: 1600x900mm (63.0x35.4") 
           diag: 1836mm (72.3") 
           OpenGL: 
           renderer: AMD Radeon Vega 10 Graphics (RAVEN DRM 3.42.0 5.14.0-3mx-amd64 LLVM 11.0.1) 
           v: 4.6 Mesa 20.3.4 direct render: Yes 
DELL SPECS

Code: Select all

CPU: Dual Core Intel Core2 Duo T9300 (-MCP-) 
speed/min/max: 1512/800/2501 MHz Kernel: 5.10.57-antix.1-amd64-smp x86_64 
Up: 7d 3h 35m Mem: 1212.1/2987.6 MiB (40.6%) 
Storage: 305.59 GiB (14.9% used) Procs: 146 Shell: Bash 5.1.4 inxi: 3.3.06 
Laurie@antix1:~
$ inxi -xxx
CPU: Dual Core Intel Core2 Duo T9300 (-MCP-) 
speed/min/max: 1275/800/2501 MHz Kernel: 5.10.57-antix.1-amd64-smp x86_64 
Up: 7d 3h 35m Mem: 1213.1/2987.6 MiB (40.6%) 
Storage: 305.59 GiB (14.9% used) Procs: 144 Shell: Bash 5.1.4 inxi: 3.3.06 
Graphics:
  Device-1: NVIDIA G84M [GeForce 8600M GT] driver: nvidia v: 340.108 
  Device-2: OmniVision OV2640 Webcam type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.11 driver: loaded: nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1440x900~60Hz 
  OpenGL: renderer: GeForce 8600M GT/PCIe/SSE2 v: 3.3.0 NVIDIA 340.108 
Attachments
FreeCAD Resource Usage - Thinkpad 1.png
FreeCAD Resource Usage - Thinkpad 1.png (24.75 KiB) Viewed 2163 times
FreeCAD Resource Usage - Dell 2 .png
FreeCAD Resource Usage - Dell 2 .png (20.38 KiB) Viewed 2163 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Does Freecad use GPU?

Post by thomas-neemann »

Laurie Hartley wrote: Fri Jan 28, 2022 3:38 am ...
The only difference I can notice between the two of them is the Dell takes a bit longer to load FreeCAD. When opening my largest FreeCAD file there is no noticeable difference. ...
e.g. with large step imports you have to notice a difference because your cpu clock is different.
I did one of these tests.


testfile
https://grabcad.com/library/isolation-g ... ing-line-1


1.png
1.png (137.86 KiB) Viewed 2086 times
lenovo.png
lenovo.png (133.17 KiB) Viewed 2086 times

asus.png
asus.png (84.43 KiB) Viewed 2086 times

as expected, the loading times were 2:3 with clock differences of around 2:3
the older and weaker computer was faster because the cpu clock is higher
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Does Freecad use GPU?

Post by Laurie Hartley »

thomas-neemann wrote: Sat Jan 29, 2022 9:14 am
Laurie Hartley wrote: Fri Jan 28, 2022 3:38 am ...
The only difference I can notice between the two of them is the Dell takes a bit longer to load FreeCAD. When opening my largest FreeCAD file there is no noticeable difference. ...
e.g. with large step imports you have to notice a difference because your cpu clock is different.
I did one of these tests.

as expected, the loading times were 2:3 with clock differences of around 2:3
the older and weaker computer was faster because the cpu clock is higher
As a result of your post I ran a speed check on my two computers - here are the results:

Thinkpad:
Load version 20 weekly build --- 19.45 seconds
Load largest FreeCAD file .FCStd 560Kb --- 2 seconds

Dell:
Load version 20 weekly build --- 13.89 seconds !!
Load largest FreeCAD file .FCStd 560Kb --- 10 seconds

The Thinkpad has 32GiB of Ram the Dell 3Gib

I think this is very interesting and will help leoheck the original poster with the information he requires to make whatever decision he has to make about his choice of hardware.

When I was buying my laptop I wasn't sure what spec I needed but had read somewhere that FreeCAD is very low on resource usage. This thread seems to prove the point.

I wonder if this is something that should be gone into in more detail on the FreeCAD documentation / wiki??
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Does Freecad use GPU?

Post by GeneFC »

thomas-neemann wrote: Sat Jan 29, 2022 9:14 am the older and weaker computer was faster because the cpu clock is higher
In general this is not correct. A typical operation in the CPU takes multiple clock cycles. The primary difference between an i3 and an i7, for example, is that the i7 has a much bigger capacity for running multiple microcode steps at the same time, therefore requiring fewer clock cycles for an operation.

This has nothing to do with multi-threading or software parallelism. The *hardware* in the more capable CPU has more parallel registers and related stuff. Larger onboard cache, better bus structure. Etc. Etc.

Until about 20 or 25 years ago clock speed was almost the only performance measure for a CPU. Since then clock speed has hardly changed while the parallel hardware features have grown enormously.

Gene
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Does Freecad use GPU?

Post by freedman »

My PC seems to.
Attachments
gpu.gif
gpu.gif (224.33 KiB) Viewed 1974 times
Laurie Hartley
Posts: 522
Joined: Mon Feb 27, 2017 5:33 am
Location: Australia

Re: Does Freecad use GPU?

Post by Laurie Hartley »

GeneFC wrote: Mon Jan 31, 2022 4:45 am
thomas-neemann wrote: Sat Jan 29, 2022 9:14 am the older and weaker computer was faster because the cpu clock is higher
In general this is not correct. A typical operation in the CPU takes multiple clock cycles. The primary difference between an i3 and an i7, for example, is that the i7 has a much bigger capacity for running multiple microcode steps at the same time, therefore requiring fewer clock cycles for an operation.

This has nothing to do with multi-threading or software parallelism. The *hardware* in the more capable CPU has more parallel registers and related stuff. Larger onboard cache, better bus structure. Etc. Etc.

Until about 20 or 25 years ago clock speed was almost the only performance measure for a CPU. Since then clock speed has hardly changed while the parallel hardware features have grown enormously.

Gene
So GeneFC what do you make of my comparison - the older computer with 3Gib of ram loads FreeCAD programme faster but the file slower? I am trying to understand why that would be?
@freedman what is that widget you are monitoring the GPU with and what operating system?
chrisb
Veteran
Posts: 53924
Joined: Tue Mar 17, 2015 9:14 am

Re: Does Freecad use GPU?

Post by chrisb »

Laurie Hartley wrote: Mon Jan 31, 2022 6:26 am what do you make of my comparison - the older computer with 3Gib of ram loads FreeCAD programme faster but the file slower?
There is more to consider for a comparison: a first guess would be a faster harddisk on the older computer, or even an SSD; do you use the same OS; was it directly after booting; was freecad started before on the older, ...?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Does Freecad use GPU?

Post by thomas-neemann »

chrisb wrote: Mon Jan 31, 2022 6:34 am
There is more to consider for a comparison: a first guess would be a faster harddisk on the older computer, or even an SSD; do you use the same OS; was it directly after booting; was freecad started before on the older, ...?
the older computer has a slow magnetic disk, the newer one has an ssd. xubuntu 20.04.1 was running on both computers, and it was freshly installed on the newer one. freecad was started fresh on both and the test was carried out.
nevertheless the old one was faster
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Does Freecad use GPU?

Post by thomas-neemann »

GeneFC wrote: Mon Jan 31, 2022 4:45 am
In general this is not correct.
what cpu clock does your pc have and how long does it take for the test file?
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply