Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE-old
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
PortWINE-old
Commits
b99dc82c
Commit
b99dc82c
authored
Aug 25, 2023
by
Boria138
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Beatify code
parent
3b391b54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
16 deletions
+67
-16
functions_helper
data_from_portwine/scripts/functions_helper
+67
-16
No files found.
data_from_portwine/scripts/functions_helper
View file @
b99dc82c
...
...
@@ -1062,27 +1062,78 @@ pw_find_exe () {
fi
}
nvidia_check_arch
(){
if
[[
$(
lspci |
grep
"VGA
\|
3D"
|
sed
-rn
's/.*(NVIDIA).*/\1/p'
)
]]
;
then
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(G[0-9]*).*/\1/p'
)
==
G[0-9]
*
]]
&&
nv_arch
=
Tesla
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GT[0-9]*).*/\1/p'
)
==
GT[0-9]
*
]]
&&
nv_arch
=
Tesla
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(MCP[0-9]*).*/\1/p'
)
==
MCP[0-9]
*
]]
&&
nv_arch
=
Tesla
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GF[0-9]*).*/\1/p'
)
==
GF[0-9]
*
]]
&&
nv_arch
=
Fermi
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GK[0-9]*).*/\1/p'
)
==
GK[0-9]
*
]]
&&
nv_arch
=
Kepler
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GM[0-9]*).*/\1/p'
)
==
GM[0-9]
*
]]
&&
nv_arch
=
Maxwell
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GP[0-9]*).*/\1/p'
)
==
GP[0-9]
*
]]
&&
nv_arch
=
Pascal
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GV[0-9]*).*/\1/p'
)
==
GV[0-9]
*
]]
&&
nv_arch
=
Volta
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(TU[0-9]*).*/\1/p'
)
==
TU[0-9]
*
]]
&&
nv_arch
=
Turing
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(TU[0-9]*).*/\1/p'
)
==
TU116
]]
&&
nv_arch
=
Turing_16
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(TU[0-9]*).*/\1/p'
)
==
TU117
]]
&&
nv_arch
=
Turing_16
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(GA[0-9]*).*/\1/p'
)
==
GA[0-9]
*
]]
&&
nv_arch
=
Ampere
[[
$(
lspci |
grep
VGA |
sed
-rn
's/.*(AD[0-9]*).*/\1/p'
)
==
AD[0-9]
*
]]
&&
nv_arch
=
Ada_Lovelace
nvidia_check_arch
()
{
lspci_output
=
$(
lspci |
grep
VGA
)
if
echo
"
$lspci_output
"
|
grep
-i
"nvidia"
;
then
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(G[0-9]*).*/\1/p'
)
if
[[
$arch
==
G[0-9]
*
]]
;
then
nv_arch
=
Tesla
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GT[0-9]*).*/\1/p'
)
if
[[
$arch
==
GT[0-9]
*
]]
;
then
nv_arch
=
Tesla
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(MCP[0-9]*).*/\1/p'
)
if
[[
$arch
==
MCP[0-9]
*
]]
;
then
nv_arch
=
Tesla
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GF[0-9]*).*/\1/p'
)
if
[[
$arch
==
GF[0-9]
*
]]
;
then
nv_arch
=
Fermi
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GK[0-9]*).*/\1/p'
)
if
[[
$arch
==
GK[0-9]
*
]]
;
then
nv_arch
=
Kepler
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GM[0-9]*).*/\1/p'
)
if
[[
$arch
==
GM[0-9]
*
]]
;
then
nv_arch
=
Maxwell
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GP[0-9]*).*/\1/p'
)
if
[[
$arch
==
GP[0-9]
*
]]
;
then
nv_arch
=
Pascal
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GV[0-9]*).*/\1/p'
)
if
[[
$arch
==
GV[0-9]
*
]]
;
then
nv_arch
=
Volta
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(TU[0-9]*).*/\1/p'
)
if
[[
$arch
==
TU[0-9]
*
]]
;
then
nv_arch
=
Turing
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(TU116).*/\1/p'
)
if
[[
$arch
==
TU116
]]
;
then
nv_arch
=
Turing_16
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(TU117).*/\1/p'
)
if
[[
$arch
==
TU117
]]
;
then
nv_arch
=
Turing_16
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(GA[0-9]*).*/\1/p'
)
if
[[
$arch
==
GA[0-9]
*
]]
;
then
nv_arch
=
Ampere
fi
arch
=
$(
echo
"
$lspci_output
"
|
sed
-rn
's/.*(AD[0-9]*).*/\1/p'
)
if
[[
$arch
==
AD[0-9]
*
]]
;
then
nv_arch
=
Ada_Lovelace
fi
fi
}
nvidia_check_arch
# Check for Nvidia GPU available
if
[[
-n
"
$nv_arch
"
]]
;
then
if
[[
$nv_arch
==
Turing
||
$nv_arch
==
Ampere
||
$nv_arch
==
Ada_Lovelace
]]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment