Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Testicular Slingshot
Alchemy Viewer
Commits
c19f427c
Commit
c19f427c
authored
11 years ago
by
Oz Linden
Browse files
Options
Downloads
Patches
Plain Diff
update tester for new gpu_table.txt format
parent
c50f44e0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/gpu_table_tester
+46
-21
46 additions, 21 deletions
scripts/gpu_table_tester
with
46 additions
and
21 deletions
scripts/gpu_table_tester
+
46
−
21
View file @
c19f427c
...
...
@@ -46,8 +46,8 @@ my $mini_HELP = "
$MyName
{--gpu-table|-g} <gpu_table.txt> {--diff|-d} <old_results> [ <gpu-strings-file> ...]
With the --diff option, the report compares the current results to <old-results>,
which should be the output from a previous run without --diff. The report shows
each
input value with the old result and the new result if
it is
different.
which should be the output from a previous run without --diff. The report shows
each
input value with the old result and the new result if
they are
different.
";
&GetOptions
("
help
"
=>
\
$Help
...
...
@@ -81,11 +81,15 @@ my %Recognizer; # name -> recognizer
my
%Class
;
# recognizer -> class
my
%Supported
;
# recognizer -> supported
my
@InOrder
;
# lowercased recognizers in file order - these are the ones really used to match
my
%StatsBased
;
my
%ExpectedOpenGL
;
$Name
{
$NoMatch
}
=
$NoMatch
;
$NameLine
{
$NoMatch
}
=
'
(hard-coded)
';
# use this for error messages in table parsing
$Class
{
$NoMatch
}
=
'';
$Supported
{
$NoMatch
}
=
'';
$StatsBased
{
$NoMatch
}
=
'';
$ExpectedOpenGL
{
$NoMatch
}
=
'';
while
(
<
GPUS
>
)
{
...
...
@@ -93,7 +97,7 @@ while (<GPUS>)
next
if
m|^\s*$|
;
# skip blank lines
chomp
;
my
(
$name
,
$regex
,
$class
,
$supported
,
$extra
)
=
split
('
\t+
');
my
(
$name
,
$regex
,
$class
,
$supported
,
$stats_based
,
$expected_opengl
,
$extra
)
=
split
('
\t+
');
my
$errsOnLine
=
$ErrorsSeen
;
if
(
!
$name
)
{
...
...
@@ -119,7 +123,7 @@ while (<GPUS>)
print
STDERR
"
$INPUT_LINE_NUMBER
: name '
$name
'
"
.
(
$supported
?
"
supported
"
:
"
unsupported
")
.
"
class
$class
- ignored
\n
";
$ErrorsSeen
++
;
}
if
(
$class
!~
m/[0123]/
)
if
(
$class
!~
m/[0123
45
]/
)
{
print
STDERR
"
Invalid class value '
$class
' on
$GpuTable
line
$INPUT_LINE_NUMBER
\n
";
$ErrorsSeen
++
;
...
...
@@ -129,6 +133,16 @@ while (<GPUS>)
print
STDERR
"
Invalid supported value '
$supported
' on
$GpuTable
line
$INPUT_LINE_NUMBER
\n
";
$ErrorsSeen
++
;
}
if
(
$stats_based
!~
m/[01]/
)
{
print
STDERR
"
Invalid stats_based value '
$stats_based
' on
$GpuTable
line
$INPUT_LINE_NUMBER
\n
";
$ErrorsSeen
++
;
}
if
(
$expected_opengl
!~
m/\d+(\.\d+)?/
)
{
print
STDERR
"
Invalid expected_opengl value '
$expected_opengl
' on
$GpuTable
line
$INPUT_LINE_NUMBER
\n
";
$ErrorsSeen
++
;
}
if
(
$extra
)
{
print
STDERR
"
Extra data '
$extra
' on
$GpuTable
line
$INPUT_LINE_NUMBER
\n
";
...
...
@@ -144,6 +158,8 @@ while (<GPUS>)
$Recognizer
{
$name
}
=
$regex
;
$Class
{
$regex
}
=
$class
;
$Supported
{
$regex
}
=
$supported
?
"
supported
"
:
"
unsupported
";
$StatsBased
{
$regex
}
=
$stats_based
;
$ExpectedOpenGL
{
$regex
}
=
$expected_opengl
;
}
}
...
...
@@ -174,27 +190,27 @@ while (<>)
}
format
STDOUT_TOP
=
GPU String Supported? Class Recognizer
------------------------------------------------------------------------------------------------------ ----------- ----- ------------------------------------
GPU String Supported? Class
Stats OpenGL
Recognizer
------------------------------------------------------------------------------------------------------ ----------- -----
----- ------
------------------------------------
.
format
STDOUT
=
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @> @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
$_, $Supported{$RecognizedBy{$_}},$Class{$RecognizedBy{$_}},$Name{$RecognizedBy{$_}}
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @>
@> @<<<<
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
$_, $Supported{$RecognizedBy{$_}},$Class{$RecognizedBy{$_}},$
StatsBased{$RecognizedBy{$_}},$ExpectedOpenGL{$RecognizedBy{$_}},$
Name{$RecognizedBy{$_}}
.
my
$ReportLineTemplate
=
"
A102xxxA12xxxAA*
";
# MUST match the format STDOUT above
my
$ReportLineTemplate
=
"
A102xxxA12xxxA
2xxxxA2xxxxA5
A*
";
# MUST match the format STDOUT above
format
DIFF_TOP
=
------
OLD
------
------ NEW ------
GPU String Supported? Class Supported? Class
------------------------------------------------------------------------------------------------------ ----------- ----- ----------- -----
------
------- OLD -------
------
-----
------ NEW ------
---------
GPU String Supported? Class
Stats OpenGL
Supported? Class
Stats OpenGL
------------------------------------------------------------------------------------------------------ ----------- -----
----- ------
----------- -----
----- ------
.
my ( $oldSupported, $oldClass, $newSupported, $newClass );
format DIFF =
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @> @<<<<<<<<<< @>
$_,
$oldSupported, $oldClass, $newSupported, $newClass
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... @<<<<<<<<<< @>
@> @<<<<
@<<<<<<<<<<
@>
@> @<<<<
$_,
$oldSupported, $oldClass, $oldStatsBased, $oldExpectedOpenGL, $newSupported, $newClass, $newStatsBased, $newExpectedOpenGL
.
if
(
!
$Diff
)
...
...
@@ -215,12 +231,14 @@ else
my
$discard
=
2
;
while
(
<
OLD
>
)
{
if
(
$discard
>
0
)
if
(
$discard
<=
0
)
{
my
(
$gpu
,
$supported
,
$class
)
=
unpack
$ReportLineTemplate
;
my
(
$gpu
,
$supported
,
$class
,
$stats
,
$opengl
)
=
unpack
$ReportLineTemplate
;
$gpu
=~
s/\s*$//
;
(
$OldSupported
{
$gpu
}
=
$supported
)
=~
s/\s*$//
;
(
$OldClass
{
$gpu
}
=
$class
)
=~
s/\s*$//
;
(
$OldStatsBased
{
$gpu
}
=
$stats
)
=~
s/\s*$//
;
(
$OldExpectedOpenGL
{
$gpu
}
=
$opengl
)
=~
s/\s*$//
;
}
else
{
...
...
@@ -235,26 +253,33 @@ else
{
$newSupported
=
$Supported
{
$RecognizedBy
{
$_
}}
||
$NoMatch
;
$newClass
=
$Class
{
$RecognizedBy
{
$_
}};
$newStatsBased
=
$StatsBased
{
$RecognizedBy
{
$_
}};
$newExpectedOpenGL
=
$ExpectedOpenGL
{
$RecognizedBy
{
$_
}};
if
(
!
defined
$OldSupported
{
$_
}
)
{
$oldSupported
=
'
NEW
';
$oldClass
=
'
-
';
$oldStatsBased
=
'
-
';
$oldExpectedOpenGL
=
'
-
';
write
;
}
else
{
$oldSupported
=
$OldSupported
{
$_
}
||
$NoMatch
;
$oldClass
=
$OldClass
{
$_
};
$oldStatsBased
=
$OldStatsBased
{
$_
};
$oldExpectedOpenGL
=
$OldExpectedOpenGL
{
$_
};
if
(
(
$oldSupported
eq
$newSupported
)
&&
(
$oldClass
eq
$newClass
)
if
(
(
$oldSupported
ne
$newSupported
)
||
(
$oldClass
ne
$newClass
)
||
(
$oldStatsBased
ne
$newStatsBased
)
||
(
$oldExpectedOpenGL
ne
$newExpectedOpenGL
)
)
{
$newSupported
=
'';
$newClass
=
'';
write
;
}
}
write
;
$-
++
;
# suppresses pagination
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment