python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
python/cudaq/domains/chemistry/__init__.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/__init__.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/ionq/__init__.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/iqm/mock_iqm_server.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/iqm/mock_iqm_cortex_cli.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/quantinuum/__init__.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
utils/mock_qpu/oqc/__init__.py
# ============================================================================ # # Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates. # # All rights reserved. # # ...
cuda-quantum-main
docs/sphinx/conf.py
import cudaq import numpy as np # Set the target to our density matrix simulator. cudaq.set_target('density-matrix-cpu') # CUDA Quantum supports custom noise models through the definition of # `KrausChannel`'s. In this case, we will define a set of `KrausOperator`'s # that affect the same noise as the `AmplitudeDamp...
cuda-quantum-main
docs/sphinx/examples/python/noise_kraus_operator.py
import cudaq import random def random_bitstring(length: int): bitstring = "" for bit in range(length): bitstring += str(random.randint(0, 1)) return bitstring def oracle(kernel: cudaq.Kernel, register: cudaq.QuakeValue, auxillary_qubit: cudaq.QuakeValue, hidden_bitstring: str): ""...
cuda-quantum-main
docs/sphinx/examples/python/bernstein_vazirani.py
import cudaq # Set the target to our density matrix simulator. cudaq.set_target('density-matrix-cpu') # CUDA Quantum supports several different models of noise. In this # case, we will examine the modeling of decoherence of the qubit phase. # This will occur from "phase flip" errors, wherein the qubit has a # user-sp...
cuda-quantum-main
docs/sphinx/examples/python/noise_phase_flip.py
import cudaq # Set the target to our density matrix simulator. cudaq.set_target('density-matrix-cpu') # CUDA Quantum supports several different models of noise. In this case, # we will examine the modeling of decoherence of the qubit state. This # will occur from "bit flip" errors, wherein the qubit has a user-specif...
cuda-quantum-main
docs/sphinx/examples/python/noise_bit_flip.py
import cudaq # Set the target to our density matrix simulator. cudaq.set_target('density-matrix-cpu') # CUDA Quantum supports several different models of noise. In this # case, we will examine the modeling of depolarization noise. This # depolarization will result in the qubit state decaying into a mix # of the basis...
cuda-quantum-main
docs/sphinx/examples/python/noise_depolarization.py
import cudaq from cudaq import spin import numpy as np # Here we build up a kernel for QAOA with `p` layers, with each layer # containing the alternating set of unitaries corresponding to the problem # and the mixer Hamiltonians. The algorithm leverages the VQE algorithm # to compute the Max-Cut of a rectangular grap...
cuda-quantum-main
docs/sphinx/examples/python/qaoa_maxcut.py
import cudaq # Set the target to our density matrix simulator. cudaq.set_target('density-matrix-cpu') # CUDA Quantum supports several different models of noise. In this case, # we will examine the modeling of energy dissipation within our system # via environmental interactions. The result of this "amplitude damping"...
cuda-quantum-main
docs/sphinx/examples/python/noise_amplitude_damping.py
import cudaq from cudaq import spin from typing import List, Tuple # We will be optimizing over a custom objective function that takes a vector # of parameters as input and returns either the cost as a single float, # or in a tuple of (cost, gradient_vector) depending on the optimizer used. # In this case, we will u...
cuda-quantum-main
docs/sphinx/examples/python/advanced_vqe.py
import cudaq from cudaq import spin # We begin by defining the spin Hamiltonian for the system that we are working # with. This is achieved through the use of `cudaq.SpinOperator`'s, which allow # for the convenient creation of complex Hamiltonians out of Pauli spin operators. hamiltonian = 5.907 - 2.1433 * spin.x(0) ...
cuda-quantum-main
docs/sphinx/examples/python/simple_vqe.py
import cudaq # We begin by defining the `Kernel` that we will construct our # program with. kernel = cudaq.make_kernel() # Next, we can allocate qubits to the kernel via `qalloc(qubit_count)`. # An empty call to `qalloc` will return a single qubit. qubit = kernel.qalloc() # Now we can begin adding instructions to ap...
cuda-quantum-main
docs/sphinx/examples/python/intro.py
import cudaq # You only have to set the target once! No need to redefine it # for every execution call on your kernel. # To use different targets in the same file, you must update # it via another call to `cudaq.set_target()` cudaq.set_target("iqm", url="http://localhost/cocos", **{"q...
cuda-quantum-main
docs/sphinx/examples/python/providers/iqm.py
import cudaq # You only have to set the target once! No need to redefine it # for every execution call on your kernel. # By default, we will submit to the Quantinuum syntax checker. cudaq.set_target("quantinuum") # Create the kernel we'd like to execute on Quantinuum. kernel = cudaq.make_kernel() qubits = kernel.qall...
cuda-quantum-main
docs/sphinx/examples/python/providers/quantinuum.py
import cudaq # You only have to set the target once! No need to redefine it # for every execution call on your kernel. # To use different targets in the same file, you must update # it via another call to `cudaq.set_target()` cudaq.set_target("ionq") # Create the kernel we'd like to execute on IonQ. kernel = cudaq.ma...
cuda-quantum-main
docs/sphinx/examples/python/providers/ionq.py
#!/usr/bin/env python ################################################################################################# # Copyright (c) 2010, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory # Written by Todd Gamblin, tgamblin@llnl.gov. # LLNL-CODE-417602 # All rights ...
cuda-profiler-master
nvtx_pmpi_wrappers/wrap/wrap.py
#!/usr/bin/python import json from collections import OrderedDict from sys import argv def return_json(payload): return(json.dumps(payload, sort_keys=True, indent=4 ) ) if argv[1] == 'update_order': fw_manifest = argv[2] ver...
deepops-master
roles/nvidia-dgx-firmware/files/parse_manifest.py
#!/usr/bin/env python3 import sys import getopt import math def print_help(): print("") print("calculate_N.py -- A script to calculate a range of N values near maximum Memory Use") print("") print("Example:") print(" ./calculate.py --mem 32768 --nb 192 --ranks 8") print("") print("") ...
deepops-master
workloads/bit/hpl/calculate_N.py
#!/usr/bin/python3 # # format_results.py # # This script will format the results from an HPL # experiment and write them into a comma separated file # to be read into a spreadsheet for additional analysis. import sys import os import subprocess import getopt import re def print_help(): print("") print("\tf...
deepops-master
workloads/bit/hpl/format_results.py
#!/usr/bin/env python3 # # verify_hpl_experiment.sh <DIRECTORY> (SYSTEM) # # This script will do two things. # 1) It will verify the performance against a reference, if the reference is available # 2) It will verify performance based on jitter of all of the results. # # In the event there are failed jobs, the no...
deepops-master
workloads/bit/hpl/verify_hpl_experiment.py
# pylint: disable-all import os, sys, argparse, time import cupy import dask import dask.array as da from dask_cuda import LocalCUDACluster from dask.distributed import Client, LocalCluster, wait from dask.delayed import delayed from dask.diagnostics import ProgressBar from multiprocessing.pool import ThreadPool import...
deepops-master
workloads/examples/slurm/dask-rapids/files/sum.py
#!/usr/bin/env python3 ''' Kubeflow documentation: https://kubeflow-pipelines.readthedocs.io/en/latest/_modules/kfp/dsl/_container_op.html K8S documentation: https://github.com/kubernetes-client/python/blob/02ef5be4ecead787961037b236ae498944040b43/kubernetes/docs/V1Container.md Example Triton Inference Server Models: ...
deepops-master
workloads/examples/k8s/kubeflow-pipeline-deploy/triton.py
deepops-master
workloads/examples/k8s/kubeflow-pipeline-deploy/__init__.py
#!/usr/bin/env python3 import kfp.dsl as dsl from kubernetes import client as k8s_client import yaml __TRITON_CONTAINER_VERSION__ = 'nvcr.io/nvidia/tritonserver:21.02-py3' __TRITON_POD_LABEL__ = 'triton-kubeflow' __TRITON_SERVICE_MANIFEST___ = ''' apiVersion: v1 kind: Service metadata: name: {} spec: selector: ...
deepops-master
workloads/examples/k8s/kubeflow-pipeline-deploy/triton_ops.py
import kfp import kfp_server_api import json import time # Define and build a Kubeflow Pipeline @kfp.dsl.pipeline( name="kubeflow-quick-test", description="Verify Kubeflow can launch a container via a pipeline") def test_kubeflow_op(): op = kfp.dsl.ContainerOp( name='kubeflow-test-op', image='b...
deepops-master
workloads/jenkins/scripts/test-kubeflow-pipeline.py
#!/usr/bin/env python '''Because there is currently no clean way to update this config through ks this script exists. The purpose of this script is to dynamically update Kubeflow to point at the latest NGC containers. In addition to that it changes default resource requests to optimize for GPUs TODO: Do this with Ans...
deepops-master
scripts/k8s/update_kubeflow_config.py
#!/usr/bin/python import datetime, bisect def parse_timestamp(raw_str): tokens = raw_str.split() if len(tokens) == 1: if tokens[0].lower() == 'never': return 'never'; else: raise Exception('Parse error in timestamp') ...
deepops-master
src/containers/dgxie/get_hosts.py
#!/usr/bin/python from flask import Flask, abort, request import json import datetime import re import os app = Flask(__name__) @app.route('/v1/boot/<mac>') def pxe(mac): '''See https://github.com/danderson/netboot/blob/master/pixiecore/README.api.md for API specs''' # load machine profiles for each call so w...
deepops-master
src/containers/dgxie/api.py
#!/usr/bin/python from flask import Flask, request from subprocess import check_output as run import datetime file = "/www/install.log" with open(file, "a") as install_file: install_file.write("== LOG OPENED ==\n") app = Flask(__name__) @app.route('/hosts') def hosts(): return run("/usr/local/bin/get_hosts....
deepops-master
src/containers/dgxie/rest_api.py
#!/usr/bin/env python """ Get a list of Ansible playbooks and roles that have changes staged in Git. Run ansible-lint on only those playbooks and roles. """ from __future__ import print_function import subprocess import re import sys def get_changed_ansible_paths(): """ Get a list of playbook files and role...
deepops-master
src/repo/githooks/check-ansible.py
#!/usr/bin/env python """ Get a list of changed python scripts that are staged for commit. Run shellcheck on only those files. """ from __future__ import print_function import subprocess import re import sys def get_changed_paths(): git_diff = subprocess.check_output("git diff --name-only --cached".split()) ...
deepops-master
src/repo/githooks/check-python.py
#!/usr/bin/env python """ Get a list of changed bash scripts that are staged for commit. Run shellcheck on only those files. """ from __future__ import print_function import subprocess import re import sys def get_changed_shell_paths(): git_diff = subprocess.check_output("git diff --name-only --cached".split())...
deepops-master
src/repo/githooks/check-shell.py
#!/usr/bin/python3 #***************************************************************************** # Copyright 2020 NVIDIA Corporation. All rights reserved. #***************************************************************************** import subprocess import argparse import datetime import json import time def get_...
nvindex-cloud-master
provision/gke/finalize.py
import websocket import random import logging import sys import json import base64 import ssl import time logging.basicConfig(stream=sys.stdout, level=logging.INFO) def get_websocket(ws_cmd_url, credentials=None): """ Generate a WebSocket connection to the service """ if credentials: b64 = base64.b6...
nvindex-cloud-master
notebooks/nvindex_util.py
#!/usr/bin/env python2 import sys, subprocess if len(sys.argv) > 2: ifile = sys.argv[1] encopt = sys.argv[2:-1] ofile = sys.argv[-1] else: print 'usage: %s <input> [encode_options] <output>' % sys.argv[0] sys.exit(1) analysis_cmd = 'ffprobe -v error -of compact=p=0:nk=1 ' analysis_cmd += '-sho...
GMAT-main
ffmpeg-gpu/tools/normalize.py
#!/usr/bin/env python2 import sys, zmq, cmd class LavfiCmd(cmd.Cmd): prompt = 'lavfi> ' def __init__(self, bind_address): context = zmq.Context() self.requester = context.socket(zmq.REQ) self.requester.connect(bind_address) cmd.Cmd.__init__(self) def onecmd(self, cmd): ...
GMAT-main
ffmpeg-gpu/tools/zmqshell.py
# Copyright (c) 2019 Guo Yejun # # This file is part of FFmpeg. # # FFmpeg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # #...
GMAT-main
ffmpeg-gpu/tools/python/convert_from_tensorflow.py
# Copyright (c) 2019 Guo Yejun # # This file is part of FFmpeg. # # FFmpeg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # #...
GMAT-main
ffmpeg-gpu/tools/python/convert.py
# Copyright (c) 2019 # # This file is part of FFmpeg. # # FFmpeg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # FFmpeg is...
GMAT-main
ffmpeg-gpu/tools/python/convert_header.py
# Copyright (c) 2021 # # This file is part of FFmpeg. # # FFmpeg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # FFmpeg is...
GMAT-main
ffmpeg-gpu/tools/python/tf_sess_config.py
import torch import torch.cuda as cuda from frame_extractor import FrameExtractor import threading from functools import reduce import time import sys import ctypes cudaFree = ctypes.CDLL('libcudart.so').cudaFree dev = torch.device("cuda:0") # initialize cuda runtime dummy = torch.empty((1,), device=dev) def extract...
GMAT-main
metrans/python/app_extract_perf.py
import torch import torch.cuda as cuda from frame_extractor import FrameExtractor import ctypes libnvToolsExt = ctypes.CDLL('libnvToolsExt.so') nvtxRangePush = libnvToolsExt.nvtxRangePushA nvtxRangePop = libnvToolsExt.nvtxRangePop dev = torch.device("cuda:0") dummy = torch.empty((1,), device=dev) file_path = '../bui...
GMAT-main
metrans/python/app_extract.py
import ctypes CSwscale = ctypes.CDLL("../build/CSwscale.so") SwscaleCuda_Nv12ToRgbpf32_Init = CSwscale.SwscaleCuda_Nv12ToRgbpf32_Init SwscaleCuda_Nv12ToRgbpf32_Convert = CSwscale.SwscaleCuda_Nv12ToRgbpf32_Convert SwscaleCuda_Nv12ToRgbpf32_Delete = CSwscale.SwscaleCuda_Nv12ToRgbpf32_Delete SwscaleCuda_Nv12ToRgbpf32_I...
GMAT-main
metrans/python/swscale.py
import numpy as np import torch import torch.cuda as cuda from frame_extractor import FrameExtractor import heif_format import swscale import ctypes libnvToolsExt = ctypes.CDLL('libnvToolsExt.so') nvtxRangePush = libnvToolsExt.nvtxRangePushA nvtxRangePop = libnvToolsExt.nvtxRangePop dev = torch.device("cuda:0") dummy...
GMAT-main
metrans/python/app_extract_heif.py
import ctypes libavutil = ctypes.CDLL('libavutil.so') libavutil.av_log_set_level(24) CFrameExtractor = ctypes.CDLL('../build/CFrameExtractor.so') FrameExtractor_InitFromFile = CFrameExtractor.FrameExtractor_InitFromFile FrameExtractor_InitFromBuffer = CFrameExtractor.FrameExtractor_InitFromBuffer FrameExtractor_Dele...
GMAT-main
metrans/python/frame_extractor.py
import torch import torch.cuda as cuda import threading from functools import reduce import time import sys import ctypes import pdb from frame_extractor import FrameExtractor import heif_format import swscale cudaFree = ctypes.CDLL('libcudart.so').cudaFree cudaSetDevice = ctypes.CDLL('libcudart.so').cudaSetDevice d...
GMAT-main
metrans/python/app_extract_heif_perf.py
import ctypes import numpy as np CHeif = ctypes.CDLL('../build/CHeif.so') NvEncLite_InitStill = CHeif.NvEncLite_InitStill NvEncLite_EncodeDeviceFrame = CHeif.NvEncLite_EncodeDeviceFrame NvHeifWriter_Init = CHeif.NvHeifWriter_Init NvHeifWriter_WriteStillImage = CHeif.NvHeifWriter_WriteStillImage NvHeifReader_Init = CH...
GMAT-main
metrans/python/heif_format.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_bench.py
#!/usr/bin/env python3 # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy...
spark-rapids-benchmarks-dev
nds/check.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
spark-rapids-benchmarks-dev
nds/nds_transcode.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_rollback.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_power.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/PysparkBenchReport.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_validate.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_maintenance.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_gen_data.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_schema.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/nds_gen_query_stream.py
#!/usr/bin/env python3 from pyspark import SparkContext from pyspark.java_gateway import ensure_callback_server_started class PythonListener(object): package = "com.nvidia.spark.rapids.listener" @staticmethod def get_manager(): jvm = SparkContext.getOrCreate()._jvm manager = getattr(jvm, "...
spark-rapids-benchmarks-dev
nds/python_listener/PythonListener.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
spark-rapids-benchmarks-dev
nds/python_listener/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
release/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
release/utils.py
# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. """Modules required to build the TAO CLI package.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function
tao_launcher-main
release/tao/__init__.py
# Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. """Setup script to build the TAO Toolkit CLI package.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob import os import setuptools import sys from release import utils # De...
tao_launcher-main
release/tao/setup.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/version.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/config/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/types/task.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/types/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/base_instance.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/local_instance.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/builder.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/utils.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/instance_handler/whl_instance.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/docker_handler/docker_handler.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/components/docker_handler/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/entrypoint/__init__.py
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
tao_launcher-main
nvidia_tao_cli/entrypoint/tao_launcher.py
#!/usr/bin/python import sys import re from submodules.rules import rules def main(): with open(sys.argv[1], "r") as fp: lines = fp.readlines() for idx, line in enumerate(lines): if line.strip() == "# ------------------------ >8 ------------------------": break if line[0] == "#": continue if...
tao_launcher-main
scripts/git-hooks/commit-msg.py
tao_launcher-main
scripts/git-hooks/submodules/__init__.py
rules = """ # Failing to add message in the mentioned format will # cause your local commit fail. # # Please follow these rules for commit messages: # ============================================== # 1. Commit message format - first line is mandatory # [YOUR_MODULE_NAME] Subject line here not exceeding 50 characters...
tao_launcher-main
scripts/git-hooks/submodules/rules.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
cloud-native-docs-master
conf.py
# Use this file to bootstrap packman into your Python environment (3.7.x). Simply # add the path by doing sys.insert to where packmanconf.py is located and then execute: # # >>> import packmanconf # >>> packmanconf.init() # # It will use the configured remote(s) and the version of packman in the same folder, # giving y...
cloud-native-docs-master
tools/packman/packmanconf.py
# Copyright 2019 NVIDIA CORPORATION # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writi...
cloud-native-docs-master
tools/packman/bootstrap/install_package.py
import os import sys import io import contextlib import packmanapi REPO_ROOT = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../..") REPO_DEPS_FILE = os.path.join(REPO_ROOT, "deps/repo-deps.packman.xml") def bootstrap(): """ Bootstrap all omni.repo modules. Pull with packman from repo.packm...
cloud-native-docs-master
tools/repoman/repoman.py
# Use this file to bootstrap packman into your Python environment (3.7.x). Simply # add the path by doing sys.insert to where packmanconf.py is located and then execute: # # >>> import packmanconf # >>> packmanconf.init() # # It will use the configured remote(s) and the version of packman in the same folder, # giving y...
cub-master
docs/tools/packman/packmanconf.py
# Copyright 2019 NVIDIA CORPORATION # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writi...
cub-master
docs/tools/packman/bootstrap/install_package.py
import os import sys import io import contextlib import packmanapi REPO_ROOT = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../..") REPO_DEPS_FILE = os.path.join(REPO_ROOT, "deps/repo-deps.packman.xml") def bootstrap(): """ Bootstrap all omni.repo modules. Pull with packman from repo.packm...
cub-master
docs/tools/repoman/repoman.py
#!/usr/bin/env python import hpccm hpccm.config.set_container_format('docker') Stage0 += hpccm.primitives.baseimage(image='nvidia/cuda:12.1.0-devel-ubuntu22.04') Stage0 += hpccm.building_blocks.apt_get(ospackages=['git', 'tmux', 'gcc', 'g++', 'vim', 'python3', 'python-is-python3', 'ninja-build']) Stage0 += hpccm.bui...
cub-master
benchmarks/docker/recipe.py
#!/usr/bin/env python3 import cub.bench as bench # TODO: # - driver version # - host compiler + version # - gpu clocks / pm # - ecc def main(): center_estimator = bench.MedianCenterEstimator() bench.search(bench.BruteForceSeeker(center_estimator, center_estimator)) if __name__ == "__main__": main()
cub-master
benchmarks/scripts/search.py
#!/usr/bin/env python3 import sys import argparse import cub.bench def parse_arguments(): parser = argparse.ArgumentParser(description='Verify tuning variant') parser.add_argument('--variant', type=str, help='Variant to verify', default=None, required=True) variant = parser.parse_known_args()[0].varian...
cub-master
benchmarks/scripts/verify.py
#!/usr/bin/env python3 import os import re import cub import math import argparse import itertools import functools import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.stats import mannwhitneyu from scipy.stats.mstats import hdquantiles pd.options.display.max_colwid...
cub-master
benchmarks/scripts/analyze.py