Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyproject.toml #22507

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions csharp/tools/MauiModelTester/create_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def parse_args():
return args


def create_existing_data_map(pb_files: List[Path]):
def create_existing_data_map(pb_files: list[Path]):
import onnx_test_data_utils as data_utils

data_map = {}
Expand All @@ -98,9 +98,9 @@ def create_existing_data_map(pb_files: List[Path]):

def add_model_and_test_data_to_app(
model_path: Path,
symbolic_dims: Optional[Dict[str, int]] = None,
input_map: Optional[Dict[str, np.ndarray]] = None,
output_map: Optional[Dict[str, np.ndarray]] = None,
symbolic_dims: dict[str, int] | None = None,
input_map: dict[str, np.ndarray] | None = None,
output_map: dict[str, np.ndarray] | None = None,
):
import ort_test_dir_utils as utils

Expand Down
6 changes: 3 additions & 3 deletions include/onnxruntime/core/common/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

class NotImplementedException : public std::logic_error {
public:
explicit NotImplementedException(const char* _Message = "Function not yet implemented") noexcept : std::logic_error(_Message) {};
explicit NotImplementedException(const std::string& _Message = "Function not yet implemented") noexcept : std::logic_error(_Message) {};
explicit NotImplementedException(const char* _Message = "Function not yet implemented") noexcept : std::logic_error(_Message){};

Check warning on line 20 in include/onnxruntime/core/common/exceptions.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: include/onnxruntime/core/common/exceptions.h:20: Lines should be <= 120 characters long [whitespace/line_length] [2]

Check warning on line 20 in include/onnxruntime/core/common/exceptions.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/common/exceptions.h:20: You don't need a ; after a } [readability/braces] [4]
explicit NotImplementedException(const std::string& _Message = "Function not yet implemented") noexcept : std::logic_error(_Message){};

Check warning on line 21 in include/onnxruntime/core/common/exceptions.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Lines should be <= 120 characters long [whitespace/line_length] [2] Raw Output: include/onnxruntime/core/common/exceptions.h:21: Lines should be <= 120 characters long [whitespace/line_length] [2]

Check warning on line 21 in include/onnxruntime/core/common/exceptions.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/common/exceptions.h:21: You don't need a ; after a } [readability/braces] [4]
};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved

class TypeMismatchException : public std::logic_error {
public:
TypeMismatchException() noexcept : logic_error("Type mismatch") {};
TypeMismatchException() noexcept : logic_error("Type mismatch"){};

Check warning on line 26 in include/onnxruntime/core/common/exceptions.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/common/exceptions.h:26: You don't need a ; after a } [readability/braces] [4]
};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved

class OnnxRuntimeException : public std::exception {
Expand Down
2 changes: 1 addition & 1 deletion include/onnxruntime/core/framework/stream_handles.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
return {};
};
// block the host thread until all the tasks in the stream finished.
virtual void Flush() {};
virtual void Flush(){};

Check warning on line 35 in include/onnxruntime/core/framework/stream_handles.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/framework/stream_handles.h:35: You don't need a ; after a } [readability/braces] [4]
// The framework may reuse the stream instance for multiple iterations.
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
// This is the API that provide a chance to let the device stream cleanup
// resource at the end of a iteration.
Expand Down
2 changes: 1 addition & 1 deletion include/onnxruntime/core/platform/Barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
// Multiple threads can wait on the same Notification object,
// but only one caller must call Notify() on the object.
struct Notification : Barrier {
Notification() : Barrier(1) {};
Notification() : Barrier(1){};

Check warning on line 79 in include/onnxruntime/core/platform/Barrier.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/platform/Barrier.h:79: You don't need a ; after a } [readability/braces] [4]
};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
} // namespace onnxruntime
10 changes: 5 additions & 5 deletions include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,18 @@
WAIT_REVOKE,
MAX_EVENT
};
ThreadPoolProfiler(int, const CHAR_TYPE*) {};
ThreadPoolProfiler(int, const CHAR_TYPE*){};

Check warning on line 221 in include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h:221: You don't need a ; after a } [readability/braces] [4]
~ThreadPoolProfiler() = default;
ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(ThreadPoolProfiler);
void Start() {};
void Start(){};

Check warning on line 224 in include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h:224: You don't need a ; after a } [readability/braces] [4]
std::string Stop() { return "not available for minimal build"; }
void LogStart() {};
void LogStart(){};

Check warning on line 226 in include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 You don't need a ; after a } [readability/braces] [4] Raw Output: include/onnxruntime/core/platform/EigenNonBlockingThreadPool.h:226: You don't need a ; after a } [readability/braces] [4]
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
void LogEnd(ThreadPoolEvent){};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
void LogEndAndStart(ThreadPoolEvent){};
void LogStartAndCoreAndBlock(std::ptrdiff_t){};
void LogCoreAndBlock(std::ptrdiff_t){};
void LogThreadId(int) {};
void LogRun(int) {};
void LogThreadId(int){};
void LogRun(int){};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
std::string DumpChildThreadStat() { return {}; }
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
};
#else
Expand Down
2 changes: 1 addition & 1 deletion include/onnxruntime/core/providers/custom_op_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
// CustomOpContext defines an interface allowing a custom op to access ep-specific resources.
struct CustomOpContext {
CustomOpContext() = default;
virtual ~CustomOpContext() {};
virtual ~CustomOpContext(){};
};
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ namespace Experimental {

struct Session : Ort::Session {
Session(Env& env, std::basic_string<ORTCHAR_T>& model_path, SessionOptions& options)
: Ort::Session(env, model_path.data(), options) {};
: Ort::Session(env, model_path.data(), options){};
Session(Env& env, void* model_data, size_t model_data_length, SessionOptions& options)
: Ort::Session(env, model_data, model_data_length, options) {};
: Ort::Session(env, model_data, model_data_length, options){};

jchen351 marked this conversation as resolved.
Show resolved Hide resolved
// overloaded Run() with sensible defaults
std::vector<Ort::Value> Run(const std::vector<std::string>& input_names,
Expand All @@ -52,7 +52,7 @@ struct Session : Ort::Session {

struct Value : Ort::Value {
Value(OrtValue* p)
: Ort::Value(p) {};
: Ort::Value(p){};

jchen351 marked this conversation as resolved.
Show resolved Hide resolved
template <typename T>
static Ort::Value CreateTensor(T* p_data, size_t p_data_element_count, const std::vector<int64_t>& shape);
Expand Down
4 changes: 2 additions & 2 deletions include/onnxruntime/core/session/onnxruntime_cxx_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2223,8 +2223,8 @@ struct Op : detail::Base<OrtOp> {
/// </summary>
struct ShapeInferContext {
struct SymbolicInteger {
SymbolicInteger(int64_t i) : i_(i), is_int_(true) {};
SymbolicInteger(const char* s) : s_(s), is_int_(false) {};
SymbolicInteger(int64_t i) : i_(i), is_int_(true){};
SymbolicInteger(const char* s) : s_(s), is_int_(false){};
SymbolicInteger(const SymbolicInteger&) = default;
jchen351 marked this conversation as resolved.
Show resolved Hide resolved
SymbolicInteger(SymbolicInteger&&) = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ArgBase {
ArgBase(OrtKernelContext* ctx,
size_t indice,
bool is_input) : ctx_(ctx), indice_(indice), is_input_(is_input) {}
virtual ~ArgBase() {};
virtual ~ArgBase(){};

jchen351 marked this conversation as resolved.
Show resolved Hide resolved
protected:
struct KernelContext ctx_;
Expand Down
Loading
Loading