From 11b308e7363e937966b035b4891db32b4eece3bf Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 1 Oct 2010 08:55:28 -0800 Subject: integrating recent changes from fermi-test into fermi (i'll use "fermi" for more disruptive changes to the pipeline model such as updating the MSHRs and getting rid of the warp tracker, ripping out DWF, etc...) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7805] --- benchmarks/CUDA/WP/spt.pl | 219 ---------------------------------------------- 1 file changed, 219 deletions(-) delete mode 100755 benchmarks/CUDA/WP/spt.pl (limited to 'benchmarks/CUDA/WP/spt.pl') diff --git a/benchmarks/CUDA/WP/spt.pl b/benchmarks/CUDA/WP/spt.pl deleted file mode 100755 index 7dc272a..0000000 --- a/benchmarks/CUDA/WP/spt.pl +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/perl - -# 0 line number -# 1 keyword -# 2 action - -open DIRECTIVES, "| cat -n | grep '//_def_' | sed 's/ .*\\\/\\\/_def_/ / ' > directives__" or die "writing directives" ; -open TEMP1, "> tmp1__" or die "making copy of code" ; - -while () { - print DIRECTIVES ; - print TEMP1 ; -} -close DIRECTIVES ; -close TEMP1 ; - -open DEBUG, "> debug__" or die ; -## first pass, preprocess the directives - -open DIRECTIVES, "< directives__" or die ; -while () { - print TEMP1 ; - $line = $_ ; - @t = split( ' ',$line ) ; - $keyword = $t[1] ; - $action = $t[2] ; - @actionlist = split( ';', $action ) ; - foreach $act ( @actionlist ) { - @dim_vlist = split ( ':', $act ) ; - $dim = $dim_vlist[0] ; $vlist = $dim_vlist[1] ; - foreach $v ( split( ',', $vlist ) ) { - $vars{$v} = $v ; - $dimensionality{$v} = $dim ; - if ( $keyword eq "arg" ) { - $key{$v} = $keyword ; - if ( $dim eq "ikj" ) { $ikj_args{$v} = $v ; } - if ( $dim eq "ij" ) { $ij_args{$v} = $v ; } - } - if ( $keyword eq "local" ) { - $key{$v} = $keyword ; - if ( $dim eq "k" ) { $k_local{$v} = $v ; } - } - if ( $keyword eq "register" ) { - $key{$v} = $keyword ; - if ( $dim eq "0" ) { $register{$v} = $v ; } - } - if ( $keyword eq "copy_up_mem" ) { - if ( $key{$v} ne "arg" ) { - print "//warning: copy_up_mem of $v when $v is not arg.\n" ; - } else { - $copy_up_mem{$v} = $dim ; - if ( $dim eq "ikj" ) { $ikj_shared{$v} = $v ; } - if ( $dim eq "ij" ) { $ij_shared{$v} = $v ; } - } - } - if ( $keyword eq "shared_mem_local" ) { - $key{$v} = $keyword ; - $shared_mem_local{$v} = $dim ; - if ( $dim eq "ikj" ) { $ikj_shared{$v} = $v ; } - if ( $dim eq "ij" ) { $ij_shared{$v} = $v ; } - } - if ( $keyword eq "copy_down_mem" ) { - if ( $key{$v} ne "arg" ) { - print "//warning: copy_down_mem of $v when $v is not arg.\n" ; - } else { - $copy_down_mem{$v} = $dim ; - if ( $dim eq "ikj" ) { $ikj_shared{$v} = $v ; } - if ( $dim eq "ij" ) { $ij_shared{$v} = $v ; } - } - } - } - } -} -close DIRECTIVES ; - -## seond pass, modify the code -## and preprocess deferred directives - -$spton=0 ; - -open TEMP1, "< tmp1__" or die ; -while () { - $line = $_ ; - # toggle on and off between SPTSTART and SPTSTOP - if ( $line =~ "SPTSTART" ) { $spton = 1 ; } - elsif ( $line =~ "SPTSTOP" ) { $spton = 0 ; } - if ( $spton == 1 ) { - - # handle copy_up_mem and copy_down_mem directives in line - if ( $line =~ m/\/\/\s*_def_\s+copy_up_mem\s/ ) { - @t = split( ' ',$line ) ; - $action = $t[2] ; - @dim_vlist = split ( ':', $action ) ; - $vlist = $dim_vlist[1] ; - foreach $v ( split( ',', $vlist ) ) { - print "LOCSM(${v}_s,bx*by*kx) ;\n" ; - } - print "{ int k ; \n" ; - foreach $v ( split( ',', $vlist ) ) { - print "for(k=kps-1;k