This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST(InferenceSessionTests, TestIssue2404) { | |
string model_uri = "testdata/test_model.onnx"; | |
SessionOptions so; | |
//so.session_logid = "InferenceSessionTests." + log_str; | |
//so.session_log_verbosity_level = 1; // change to 1 for detailed logging | |
InferenceSession session_object{so, &DefaultLoggingManager()}; | |
CUDAExecutionProviderInfo epi; | |
epi.device_id = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import onnx | |
from onnx import numpy_helper | |
from onnx import mapping | |
from onnx import TensorProto | |
import onnxruntime as rt | |
def create_random_data(shape, type, minvalue, maxvalue, seed): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import sys | |
import onnx | |
from onnx import numpy_helper | |
from onnx import mapping | |
from onnx import TensorProto | |
import onnxruntime as rt | |
import timeit | |
def create_random_data(shape, type, minvalue, maxvalue, seed): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
using Microsoft.ML.OnnxRuntime; | |
using Microsoft.ML.OnnxRuntime.Tensors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import onnxruntime | |
import time | |
import timeit | |
def create_random_data(shape, type, minvalue, maxvalue, seed): | |
nptype = np.dtype(type) | |
np.random.seed(seed) | |
return ((maxvalue - minvalue) * np.random.sample(shape) + minvalue).astype(nptype) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright(c) Microsoft Corporation.All rights reserved. | |
// Licensed under the MIT License. | |
// Example of using IOBinding while inferencing with GPU | |
#include <assert.h> | |
#include <chrono> | |
#include <iostream> | |
#include <onnxruntime_cxx_api.h> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Licensed under the MIT License. | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
using Microsoft.ML.OnnxRuntime; | |
using Microsoft.ML.OnnxRuntime.Tensors; | |
using System.Diagnostics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <unordered_set> | |
#include <functional> | |
#include <assert.h> | |
using namespace std; | |
struct Foo { | |
string name; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright(c) Microsoft Corporation.All rights reserved. | |
// Licensed under the MIT License. | |
// | |
/* | |
pranav@XXX:~$ wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz | |
.... | |
2021-07-28 19:44:06 (7.60 MB/s) - ‘onnxruntime-linux-x64-1.8.1.tgz’ saved [4736207/4736207] | |
pranav@XXX:~$ tar xvfz onnxruntime-linux-x64-1.8.1.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright(c) Microsoft Corporation.All rights reserved. | |
// Licensed under the MIT License. | |
// | |
/* | |
INSTRUCTION TO COMPILE AND RUN | |
=============================== | |
pranav@XXX:~$ wget | |
https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz | |
.... |
OlderNewer