forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit598e011
committed
Fix code for probing availability of AVX-512.
This commit fixes a few things:* Instead of checking for CPU support of the "xsave" extension, we need to check for OS support of XGETBV instructions via the "osxsave" flag.* We must check that additional XCR0 bits are set to be sure the ZMM registers are fully enabled.* We should use the recommended ordering of steps. Specifically, we need to check that the ZMM registers are enabled prior to checking for AVX-512 via CPUID.In passing, split this code into separate functions to improvereadability.Reported-by: Andrew KaneReviewed-by: Akash Shankaran, Raghuveer DevulapalliDiscussion:https://postgr.es/m/20240418024459.GA3385227%40nathanxps131 parentbb3ca23 commit598e011
1 file changed
+47
-33
lines changedLines changed: 47 additions & 33 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 |
| - | |
| 37 | + | |
39 | 38 |
| |
40 |
| - | |
41 |
| - | |
| 39 | + | |
| 40 | + | |
42 | 41 |
| |
43 | 42 |
| |
44 | 43 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 | 44 |
| |
71 | 45 |
| |
72 | 46 |
| |
73 | 47 |
| |
74 | 48 |
| |
75 | 49 |
| |
76 | 50 |
| |
77 |
| - | |
78 |
| - | |
| 51 | + | |
| 52 | + | |
79 | 53 |
| |
80 |
| - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
81 | 63 |
| |
82 |
| - | |
| 64 | + | |
83 | 65 |
| |
84 | 66 |
| |
85 | 67 |
| |
86 | 68 |
| |
87 | 69 |
| |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
88 | 102 |
|
0 commit comments
Comments
(0)