mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-27 03:11:28 +00:00
Bugfixes: dangling pointers and python property typo (#17285)
### Description Bug fixes ### Motivation and Context Fixing one dangling pointer, and one python property name typo
This commit is contained in:
parent
fffefb1c22
commit
8827363fd2
2 changed files with 5 additions and 4 deletions
|
|
@ -254,13 +254,14 @@ dequantize(const Cli& cli)
|
|||
out.write((const char*)dstbuf.data(), std::streamsize(dstbuf.size()) * sizeof(float));
|
||||
} else {
|
||||
std::streambuf* buf;
|
||||
std::ofstream file_output_stream;
|
||||
if (cli.output_file) {
|
||||
std::ofstream out(cli.output_file, std::ios::out);
|
||||
if (!out) {
|
||||
file_output_stream.open(cli.output_file, std::ios::out);
|
||||
if (file_output_stream.fail()) {
|
||||
std::cerr << "Cannot open output file " << cli.output_file << std::endl;
|
||||
return -1;
|
||||
}
|
||||
buf = out.rdbuf();
|
||||
buf = file_output_stream.rdbuf();
|
||||
} else {
|
||||
buf = std::cout.rdbuf();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class MatMulWeight4Quantizer:
|
|||
# recursive call to take care of sub-graph
|
||||
graph_stack.append(attr.g)
|
||||
kv = {attr.name: self._process_subgraph(graph_stack)}
|
||||
elif attr.type == onnx.AttributeProto.GRAPH:
|
||||
elif attr.type == onnx.AttributeProto.GRAPHS:
|
||||
value = []
|
||||
for subgraph in attr.graphs:
|
||||
# recursive call to take care of sub-graph
|
||||
|
|
|
|||
Loading…
Reference in a new issue