@@ -248,14 +248,14 @@ sub token2feature
248
248
if (substr ($ut , 0, 1) eq ' !' ) {
249
249
my $subtoken = substr ($ut , 1);
250
250
foreach my $feature (@all_gpu_features ) {
251
- if ($subtoken eq " $lit_feature_prefix$feature " ) {
251
+ if ($subtoken eq " $lit_feature_prefix$feature " or $subtoken eq " aspect-fp64 " and $feature eq " double " ) {
252
252
push (@tokens , " !$feature " );
253
253
last ;
254
254
}
255
255
}
256
256
} else {
257
257
foreach my $feature (@all_gpu_features ) {
258
- if ($ut eq " $lit_feature_prefix$feature " ) {
258
+ if ($ut eq " $lit_feature_prefix$feature " or $ut eq " aspect-fp64 " and $feature eq " double " ) {
259
259
push (@tokens , $feature );
260
260
last ;
261
261
}
@@ -270,7 +270,7 @@ sub token2feature
270
270
if (substr ($rt , 0, 1) eq ' !' ) {
271
271
my $subtoken = substr ($rt , 1);
272
272
foreach my $feature (@all_gpu_features ) {
273
- if ($subtoken eq " $lit_feature_prefix$feature " ) {
273
+ if ($subtoken eq " $lit_feature_prefix$feature " or $subtoken eq " aspect-fp64 " and $feature eq " double " ) {
274
274
my $seen = 0;
275
275
foreach my $ref (@tokens ) {
276
276
my $ref_token = $ref ;
@@ -287,7 +287,7 @@ sub token2feature
287
287
} else {
288
288
foreach my $feature (@all_gpu_features ) {
289
289
# if (grep(/\Q$lit_feature_prefix$rt/, @all_gpu_features)) {
290
- if ($rt eq " $lit_feature_prefix$feature " ) {
290
+ if ($rt eq " $lit_feature_prefix$feature " or $rt eq " aspect-fp64 " and $feature eq " double " ) {
291
291
my $seen = 0;
292
292
foreach my $ref (@tokens ) {
293
293
my $ref_token = $ref ;
@@ -347,10 +347,10 @@ sub translate_gpu_feature
347
347
# Not support "AND", "OR", "()"
348
348
if ($line =~ / \/\/ REQUIRES: *(.*)$ / ) {
349
349
my $token_str = $1 ;
350
- @require_tokens = split (/ [ ,] / , $token_str );
350
+ @require_tokens = split (/ , |,| \&\& | \&\& | \|\| | \|\| / , $token_str );
351
351
} elsif ($line =~ / \/\/ UNSUPPORTED: *(.*)$ / ) {
352
352
my $token_str = $1 ;
353
- @unsupported_tokens = split (/ [ ,] / , $token_str );
353
+ @unsupported_tokens = split (/ , |,| \&\& | \&\& | \|\| | \|\| / , $token_str );
354
354
}
355
355
}
356
356
0 commit comments