8 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from AthenaCommon.Logging
import logging
11 from AthXRTServices.DeviceMgmtSvcConfig
import DeviceMgmtSvcCfg
12 log = logging.getLogger(
"AthExXRT.XrtKernelExampleCfg")
18 xclbin_list = [os.path.join(flags.FPGAMgmt.HLSDir,
'krnl_Combined.xclbin')]
22 OCLVectorAddEx = CompFactory.AthExXRT.VectorAddOCLExampleAlg()
23 result.addEventAlgo(OCLVectorAddEx)
25 OCLVectorMulEx = CompFactory.AthExXRT.VectorMultOCLExampleAlg()
26 result.addEventAlgo(OCLVectorMulEx)
34 xclbin_list = [os.path.join(flags.FPGAMgmt.HLSDir,
'krnl_Combined.xclbin')]
38 XRTVectorAddEx = CompFactory.AthExXRT.VectorAddXRTExampleAlg()
39 result.addEventAlgo(XRTVectorAddEx)
41 XRTVectorMulEx = CompFactory.AthExXRT.VectorMultXRTExampleAlg()
42 result.addEventAlgo(XRTVectorMulEx)
54 if __name__ ==
"__main__":
55 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
56 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
58 flags.Exec.MaxEvents = 10
60 from AthXRTServices.FPGAConfigFlags
import createFPGAMgmtFlags
63 flags.addFlag(
"FPGAMgmt.doXRT",
True)
64 flags.addFlag(
"FPGAMgmt.doOCL",
True)
69 if flags.FPGAMgmt.doXRT:
71 if flags.FPGAMgmt.doOCL:
75 sys.exit(cfg.run().isFailure())