File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 55from itertools import product
66
77fence_func = Template (
8- """
8+ """
99define void @fence_${ordering}_${scope}() {
1010 fence syncscope(\" ${scope}\" ) ${ordering}
1111 ret void
1414)
1515
1616run_statement = Template (
17- """
17+ """
1818; ${run}: llc < %s -march=nvptx64 -mcpu=sm_${sm} -mattr=+ptx${ptx} | FileCheck %s --check-prefix=SM${sm}
1919; ${run}: %if ptxas %{ llc < %s -march=nvptx -mcpu=sm_${sm} -mattr=+ptx${ptx} | %ptxas-verfy %}
2020"""
2929
3030if __name__ == "__main__" :
3131 for sm , ptx in TESTS :
32- with open ("fence-sm{}.ll" .format (sm ), "w" ) as fp :
33- print (run_statement .substitute (run = "RUN" , sm = sm , ptx = ptx ), file = fp )
32+ with open ("fence-sm{}.ll" .format (sm ), "w" ) as fp :
33+ print (run_statement .substitute (run = "RUN" , sm = sm , ptx = ptx ), file = fp )
3434 for ordering , scope in product (ORDERINGS , SCOPES ):
3535 if scope == "cluster" and (sm < 90 or ptx < 78 ):
36- print ("; .cluster scope unsupported on SM = {} PTX = {}" .format (sm , ptx ), file = fp )
36+ print (
37+ "; .cluster scope unsupported on SM = {} PTX = {}" .format (
38+ sm , ptx
39+ ),
40+ file = fp ,
41+ )
3742 else :
38- print (fence_func .substitute (scope = scope , ordering = ordering ), file = fp )
43+ print (
44+ fence_func .substitute (scope = scope , ordering = ordering ), file = fp
45+ )
You can’t perform that action at this time.
0 commit comments