Fri 29 Nov 2024 04:59:44 PM CET
This commit is contained in:
parent
7990a05c10
commit
ff85992b1d
|
@ -407,8 +407,14 @@ def read_simulation(sim_params):
|
|||
sim_order = sim_params["Simulation"]["Order"]
|
||||
# sim_device = sim_params["Simulation"]["Device"]
|
||||
|
||||
if "Device" in sim_params["Simulation"]:
|
||||
sim_device=sim_params["Simulation"]["Device"]
|
||||
else:
|
||||
sim_device="CPU"
|
||||
|
||||
SimNDT_Simulation = Simulation(TimeScale=sim_time_scale, MaxFreq=sim_max_freq, PointCycle=sim_point_cycle, SimTime=sim_simulation_time, Order=sim_order)
|
||||
|
||||
SimNDT_Simulation.preferredDeviceType = sim_device
|
||||
|
||||
print("Finished reading Simulation section.")
|
||||
print(repr(SimNDT_Simulation))
|
||||
|
@ -515,7 +521,7 @@ def SimulationSetup(Scenario, SimNDT_Mat_objs, SimNDT_Transd_objs, Simulation):
|
|||
platform_name = PlatformAndDevice[0].name
|
||||
device_name = PlatformAndDevice[1].name
|
||||
device_type = cl.device_type.to_string(PlatformAndDevice[1].type)
|
||||
if device_type != 'GPU':
|
||||
if device_type == Simulation.preferredDeviceType :
|
||||
preferred_platform = platform_name
|
||||
preferred_device = device_type
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue
Block a user