コード例 #1
0
  ocFile.close()
  count *= 4
  print("AutoGemm.py: %u kernels will be pre-compiled." % count)


################################################################################
# Main
################################################################################
if __name__ == "__main__":

  # parse arguments
  ap = argparse.ArgumentParser(description="Which gemm kernels to compile offline.")
  ap.add_argument("--output-path", dest="output" )
  ap.add_argument("--precisions", dest="precisions", action="store", nargs="+", choices=AutoGemmParameters.precisions )
  ap.add_argument("--orders", dest="orders", action="store", nargs="+", choices=AutoGemmParameters.orders )
  ap.add_argument("--transposes", dest="transposes", action="store", nargs="+", choices=AutoGemmParameters.getTransposeChoices() )
  ap.add_argument("--betas", dest="betas", action="store", nargs="+", type=int, choices=AutoGemmParameters.betas )
  args = ap.parse_args()
  if args.output:
    Common.setOutputPath(args.output)
  else:
    print("Warning: No output path specified; default is working directory.")

  # write offline compilation header
  if args.precisions is None:
    args.precisions = []
  if args.transposes is None:
    args.transposes = []
  if args.orders is None:
    args.orders = []
  if args.betas is None:
コード例 #2
0
ファイル: KernelsToPreCompile.py プロジェクト: zwets/clBLAS
    ap.add_argument("--output-path", dest="output")
    ap.add_argument("--precisions",
                    dest="precisions",
                    action="store",
                    nargs="+",
                    choices=AutoGemmParameters.precisions)
    ap.add_argument("--orders",
                    dest="orders",
                    action="store",
                    nargs="+",
                    choices=AutoGemmParameters.orders)
    ap.add_argument("--transposes",
                    dest="transposes",
                    action="store",
                    nargs="+",
                    choices=AutoGemmParameters.getTransposeChoices())
    ap.add_argument("--betas",
                    dest="betas",
                    action="store",
                    nargs="+",
                    type=int,
                    choices=AutoGemmParameters.betas)
    args = ap.parse_args()
    if args.output:
        Common.setOutputPath(args.output)
    else:
        print(
            "Warning: No output path specified; default is working directory.")

    # write offline compilation header
    if args.precisions is None:
コード例 #3
0
  ocFile.close()
  count *= 4
  print "AutoGemm.py: %u kernels will be pre-compiled." % count


################################################################################
# Main
################################################################################
if __name__ == "__main__":

  # parse arguments
  ap = argparse.ArgumentParser(description="Which gemm kernels to compile offline.")
  ap.add_argument("--output-path", dest="output" )
  ap.add_argument("--precisions", dest="precisions", action="store", nargs="+", choices=AutoGemmParameters.precisions )
  ap.add_argument("--orders", dest="orders", action="store", nargs="+", choices=AutoGemmParameters.orders )
  ap.add_argument("--transposes", dest="transposes", action="store", nargs="+", choices=AutoGemmParameters.getTransposeChoices() )
  ap.add_argument("--betas", dest="betas", action="store", nargs="+", type=int, choices=AutoGemmParameters.betas )
  args = ap.parse_args()
  if args.output:
    Common.setOutputPath(args.output)
  else:
    print "Warning: No output path specified; default is working directory."

  # write offline compilation header
  if args.precisions is None:
    args.precisions = []
  if args.transposes is None:
    args.transposes = []
  if args.orders is None:
    args.orders = []
  if args.betas is None: