@@ -16,65 +16,65 @@ state = PlatformFeatures()
1616
1717
1818defT = [
19- :node_count => Tuple{AtLeast1,AtMostInf} ,
19+ :node_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
2020 :node_provider => Provider,
2121 :node_virtual => Query,
2222 :node_dedicated => Query,
2323 :node_machinefamily => MachineFamily,
2424 :node_machinetype => MachineType,
25- :node_vcpus_count => Tuple{AtLeast1,AtMostInf} ,
26- :node_memory_size => Tuple{AtLeast0,AtMostInf} ,
27- :node_memory_latency => Tuple{AtLeast0,AtMostInf} ,
28- :node_memory_bandwidth => Tuple{AtLeast0,AtMostInf} ,
25+ :node_vcpus_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
26+ :node_memory_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
27+ :node_memory_latency => Tuple{AtLeast0,AtMostInf,Q} where Q ,
28+ :node_memory_bandwidth => Tuple{AtLeast0,AtMostInf,Q} where Q ,
2929 :node_memory_type => MemoryType,
30- :node_memory_frequency => Tuple{AtLeast1,AtMostInf} ,
30+ :node_memory_frequency => Tuple{AtLeast1,AtMostInf,Q} where Q ,
3131 :node_coworker_count => WorkerCount, # number of worker processes (i.e., julia -p N)
32- :processor_count => Tuple{AtLeast1,AtMostInf} ,
32+ :processor_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
3333 :processor_manufacturer => Manufacturer,
3434 :processor_microarchitecture => ProcessorMicroarchitecture,
3535 :processor_simd => ProcessorSIMD,
3636 :processor_isa => ProcessorISA,
37- :processor_tdp => Tuple{AtLeast0,AtMostInf} ,
38- :processor_core_clock => Tuple{AtLeast0,AtMostInf} ,
39- :processor_core_count => Tuple{AtLeast1,AtMostInf} ,
40- :processor_core_threads_count => Tuple{AtLeast1,AtMostInf} ,
37+ :processor_tdp => Tuple{AtLeast0,AtMostInf,Q} where Q ,
38+ :processor_core_clock => Tuple{AtLeast0,AtMostInf,Q} where Q ,
39+ :processor_core_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
40+ :processor_core_threads_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
4141# :processor_core_L1_mapping => :PC1M,
42- :processor_core_L1_size => Tuple{AtLeast0,AtMostInf} ,
42+ :processor_core_L1_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
4343# :processor_core_L1_latency => :PC1T,
4444# :processor_core_L1_bandwidth => :PC1B,
4545# :processor_core_L1_linesize => :PC1L,
4646# :processor_core_L2_mapping => :PC2M,
47- :processor_core_L2_size => Tuple{AtLeast0,AtMostInf} ,
47+ :processor_core_L2_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
4848# :processor_core_L2_latency => :PC2T,
4949# :processor_core_L2_bandwidth => :PC2B,
5050# :processor_core_L2_linesize => :PC2L,
5151# :processor_L3_mapping => :PC3M,
52- :processor_L3_size => Tuple{AtLeast0,AtMostInf} ,
52+ :processor_L3_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
5353# :processor_L3_latency => :PC3T,
5454# :processor_L3_bandwidth => :PC3B,
5555# :processor_L3_linesize => :PC3L,
5656 :processor => Processor,
57- :accelerator_count => Tuple{AtLeast0,AtMostInf} ,
57+ :accelerator_count => Tuple{AtLeast0,AtMostInf,Q} where Q ,
5858 :accelerator_type => AcceleratorType,
5959 :accelerator_manufacturer => Manufacturer,
6060 :accelerator_api => Tuple{AcceleratorBackend,AcceleratorBackend,AcceleratorBackend,AcceleratorBackend,AcceleratorBackend,AcceleratorBackend,AcceleratorBackend},
6161 :accelerator_architecture => AcceleratorArchitecture,
62- :accelerator_memory_size => Tuple{AtLeast0,AtMostInf} ,
63- :accelerator_tdp => Tuple{AtLeast0,AtMostInf} ,
62+ :accelerator_memory_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
63+ :accelerator_tdp => Tuple{AtLeast0,AtMostInf,Q} where Q ,
6464 :accelerator_processor => AcceleratorProcessor,
65- :accelerator_processor_count => Tuple{AtLeast1,AtMostInf} ,
65+ :accelerator_processor_count => Tuple{AtLeast1,AtMostInf,Q} where Q ,
6666 :accelerator_memory_type => MemoryType,
6767 :accelerator => Accelerator,
68- :interconnection_startuptime => Tuple{AtLeast0,AtMostInf} ,
69- :interconnection_latency => Tuple{AtLeast0,AtMostInf} ,
70- :interconnection_bandwidth => Tuple{AtLeast0,AtMostInf} ,
68+ :interconnection_startuptime => Tuple{AtLeast0,AtMostInf,Q} where Q ,
69+ :interconnection_latency => Tuple{AtLeast0,AtMostInf,Q} where Q ,
70+ :interconnection_bandwidth => Tuple{AtLeast0,AtMostInf,Q} where Q ,
7171 :interconnection_topology => InterconnectionTopology,
7272 :interconnection_RDMA => Query,
7373 :interconnection => Interconnection,
74- :storage_size => Tuple{AtLeast0,AtMostInf} ,
75- :storage_latency => Tuple{AtLeast0,AtMostInf} ,
76- :storage_bandwidth => Tuple{AtLeast0,AtMostInf} ,
77- :storage_networkbandwidth => Tuple{AtLeast0,AtMostInf} ,
74+ :storage_size => Tuple{AtLeast0,AtMostInf,Q} where Q ,
75+ :storage_latency => Tuple{AtLeast0,AtMostInf,Q} where Q ,
76+ :storage_bandwidth => Tuple{AtLeast0,AtMostInf,Q} where Q ,
77+ :storage_networkbandwidth => Tuple{AtLeast0,AtMostInf,Q} where Q ,
7878 :storage_type => StorageType,
7979 :storage_interface => StorageInterface
8080]
@@ -190,8 +190,9 @@ function platform_parameters_kernel(p_list)
190190 r = []
191191 for k in keys (state. platform_feature)
192192 found = get (p_dict, k, nothing )
193+ found_v = ! isnothing (found) && ! (typeof (found) == Symbol) && ((found. head == :curly && length (found. args) == 2 && found. args[1 ] == :Type ) || (found. head == :macrocall && length (found. args) > 0 && found. args[1 ] in [Symbol (" @atleast" ), Symbol (" @atmost" ), Symbol (" @between" ), Symbol (" @just" ), Symbol (" @unrestricted" )])) ? :(:: $found ) : :(:: Type{<:$found} )
193194 v = state. platform_feature_default[k]
194- push! (r, isnothing (found) ? :(:: Type{<:$v} ) : :( :: Type{<:$found} ) )
195+ push! (r, isnothing (found) ? :(:: Type{<:$v} ) : found_v )
195196 end
196197
197198 return r
0 commit comments