apu_se.py (12014:f973caaf935d) apu_se.py (12418:340406d827e2)
1#
2# Copyright (c) 2015 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# For use for simulation and test purposes only
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are met:

--- 378 unchanged lines hidden (view full) ---

387 if kernel_files:
388 print "Using GPU kernel code file(s)", ",".join(kernel_files)
389 else:
390 fatal("Can't locate kernel code (.asm) in " + kernel_path)
391
392# OpenCL driver
393driver = ClDriver(filename="hsa", codefile=kernel_files)
394for cpu in cpu_list:
1#
2# Copyright (c) 2015 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# For use for simulation and test purposes only
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are met:

--- 378 unchanged lines hidden (view full) ---

387 if kernel_files:
388 print "Using GPU kernel code file(s)", ",".join(kernel_files)
389 else:
390 fatal("Can't locate kernel code (.asm) in " + kernel_path)
391
392# OpenCL driver
393driver = ClDriver(filename="hsa", codefile=kernel_files)
394for cpu in cpu_list:
395 cpu.createThreads()
395 cpu.workload = Process(executable = executable,
396 cmd = [options.cmd] + options.options.split(),
397 drivers = [driver])
398for cp in cp_list:
399 cp.workload = host_cpu.workload
400
401if fast_forward:
402 for i in xrange(len(future_cpu_list)):
403 future_cpu_list[i].workload = cpu_list[i].workload
396 cpu.workload = Process(executable = executable,
397 cmd = [options.cmd] + options.options.split(),
398 drivers = [driver])
399for cp in cp_list:
400 cp.workload = host_cpu.workload
401
402if fast_forward:
403 for i in xrange(len(future_cpu_list)):
404 future_cpu_list[i].workload = cpu_list[i].workload
405 future_cpu_list[i].createThreads()
404
405########################## Create the overall system ########################
406# List of CPUs that must be switched when moving between KVM and simulation
407if fast_forward:
408 switch_cpu_list = \
409 [(cpu_list[i], future_cpu_list[i]) for i in xrange(options.num_cpus)]
410
411# Full list of processing cores in the system. Note that

--- 169 unchanged lines hidden ---
406
407########################## Create the overall system ########################
408# List of CPUs that must be switched when moving between KVM and simulation
409if fast_forward:
410 switch_cpu_list = \
411 [(cpu_list[i], future_cpu_list[i]) for i in xrange(options.num_cpus)]
412
413# Full list of processing cores in the system. Note that

--- 169 unchanged lines hidden ---