@@ -396,40 +396,40 @@ impl NvvmArch {
396396 }
397397
398398 /// Get the target feature string (e.g., "compute_35" for Compute35, "compute_90a" for Compute90a)
399- pub fn target_feature ( & self ) -> String {
399+ pub fn target_feature ( & self ) -> & ' static str {
400400 match self {
401- Self :: Compute35 => "compute_35" . to_string ( ) ,
402- Self :: Compute37 => "compute_37" . to_string ( ) ,
403- Self :: Compute50 => "compute_50" . to_string ( ) ,
404- Self :: Compute52 => "compute_52" . to_string ( ) ,
405- Self :: Compute53 => "compute_53" . to_string ( ) ,
406- Self :: Compute60 => "compute_60" . to_string ( ) ,
407- Self :: Compute61 => "compute_61" . to_string ( ) ,
408- Self :: Compute62 => "compute_62" . to_string ( ) ,
409- Self :: Compute70 => "compute_70" . to_string ( ) ,
410- Self :: Compute72 => "compute_72" . to_string ( ) ,
411- Self :: Compute75 => "compute_75" . to_string ( ) ,
412- Self :: Compute80 => "compute_80" . to_string ( ) ,
413- Self :: Compute86 => "compute_86" . to_string ( ) ,
414- Self :: Compute87 => "compute_87" . to_string ( ) ,
415- Self :: Compute89 => "compute_89" . to_string ( ) ,
416- Self :: Compute90 => "compute_90" . to_string ( ) ,
417- Self :: Compute90a => "compute_90a" . to_string ( ) ,
418- Self :: Compute100 => "compute_100" . to_string ( ) ,
419- Self :: Compute100f => "compute_100f" . to_string ( ) ,
420- Self :: Compute100a => "compute_100a" . to_string ( ) ,
421- Self :: Compute101 => "compute_101" . to_string ( ) ,
422- Self :: Compute101f => "compute_101f" . to_string ( ) ,
423- Self :: Compute101a => "compute_101a" . to_string ( ) ,
424- Self :: Compute103 => "compute_103" . to_string ( ) ,
425- Self :: Compute103f => "compute_103f" . to_string ( ) ,
426- Self :: Compute103a => "compute_103a" . to_string ( ) ,
427- Self :: Compute120 => "compute_120" . to_string ( ) ,
428- Self :: Compute120f => "compute_120f" . to_string ( ) ,
429- Self :: Compute120a => "compute_120a" . to_string ( ) ,
430- Self :: Compute121 => "compute_121" . to_string ( ) ,
431- Self :: Compute121f => "compute_121f" . to_string ( ) ,
432- Self :: Compute121a => "compute_121a" . to_string ( ) ,
401+ Self :: Compute35 => "compute_35" ,
402+ Self :: Compute37 => "compute_37" ,
403+ Self :: Compute50 => "compute_50" ,
404+ Self :: Compute52 => "compute_52" ,
405+ Self :: Compute53 => "compute_53" ,
406+ Self :: Compute60 => "compute_60" ,
407+ Self :: Compute61 => "compute_61" ,
408+ Self :: Compute62 => "compute_62" ,
409+ Self :: Compute70 => "compute_70" ,
410+ Self :: Compute72 => "compute_72" ,
411+ Self :: Compute75 => "compute_75" ,
412+ Self :: Compute80 => "compute_80" ,
413+ Self :: Compute86 => "compute_86" ,
414+ Self :: Compute87 => "compute_87" ,
415+ Self :: Compute89 => "compute_89" ,
416+ Self :: Compute90 => "compute_90" ,
417+ Self :: Compute90a => "compute_90a" ,
418+ Self :: Compute100 => "compute_100" ,
419+ Self :: Compute100f => "compute_100f" ,
420+ Self :: Compute100a => "compute_100a" ,
421+ Self :: Compute101 => "compute_101" ,
422+ Self :: Compute101f => "compute_101f" ,
423+ Self :: Compute101a => "compute_101a" ,
424+ Self :: Compute103 => "compute_103" ,
425+ Self :: Compute103f => "compute_103f" ,
426+ Self :: Compute103a => "compute_103a" ,
427+ Self :: Compute120 => "compute_120" ,
428+ Self :: Compute120f => "compute_120f" ,
429+ Self :: Compute120a => "compute_120a" ,
430+ Self :: Compute121 => "compute_121" ,
431+ Self :: Compute121f => "compute_121f" ,
432+ Self :: Compute121a => "compute_121a" ,
433433 }
434434 }
435435
@@ -451,7 +451,7 @@ impl NvvmArch {
451451 ///
452452 /// For more details on family and architecture-specific features, see:
453453 /// <https://developer.nvidia.com/blog/nvidia-blackwell-and-nvidia-cuda-12-9-introduce-family-specific-architecture-features/>
454- pub fn all_target_features ( & self ) -> Vec < String > {
454+ pub fn all_target_features ( & self ) -> Vec < & ' static str > {
455455 // All lower-or-equal baseline features are included.
456456 let included_baseline = |arch : & NvvmArch | {
457457 arch. is_base_variant ( ) && arch. capability_value ( ) <= self . capability_value ( )
0 commit comments