torch-rb 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/codegen/generate_functions.rb +3 -6
- data/lib/torch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af82b518434a574d47ba1e9d4c785e4d295622b0092f50e6d638a88396601ef1
|
4
|
+
data.tar.gz: dbc5b4ad9e5fd1a907688f12feb9e1a01d8bab852b68a1712cd70d655ed4833f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e372efecb07c2120e03c04e96e9b9d9fd8e2242b35527e101f545397cbd9649b1fd3ccaddaf42b0cdfb6c6f8aa70d529c828a9a9a8fa248bed1ff1bc83d7d5a
|
7
|
+
data.tar.gz: a8ddbd40b7f0b70ee904098285d1c1c02ca51e2d5be46aec7d423985b04f085e9f92aa5d7f1e9dd5785b22898277ff0739b01ab6bee32235273f70c5fd76c74c
|
data/CHANGELOG.md
CHANGED
@@ -69,8 +69,6 @@ def write_header(type)
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def write_body(type, method_defs, attach_defs)
|
72
|
-
cuda_lazy_init = %{\n#include "torch/csrc/utils/cuda_lazy_init.h"\n} unless type == "nn"
|
73
|
-
|
74
72
|
template = <<~EOS
|
75
73
|
// generated by rake generate:functions
|
76
74
|
// do not edit by hand
|
@@ -81,7 +79,7 @@ def write_body(type, method_defs, attach_defs)
|
|
81
79
|
#include "ruby_arg_parser.h"
|
82
80
|
#include "templates.h"
|
83
81
|
#include "wrap_outputs.h"
|
84
|
-
|
82
|
+
|
85
83
|
%{method_defs}
|
86
84
|
void add_%{type}_functions(Module m) {
|
87
85
|
%{attach_defs}
|
@@ -91,8 +89,7 @@ def write_body(type, method_defs, attach_defs)
|
|
91
89
|
contents = template % {
|
92
90
|
type: type,
|
93
91
|
method_defs: method_defs.join("\n"),
|
94
|
-
attach_defs: attach_defs.join("\n ")
|
95
|
-
cuda_lazy_init: cuda_lazy_init
|
92
|
+
attach_defs: attach_defs.join("\n ")
|
96
93
|
}
|
97
94
|
write_file("#{type}_functions.cpp", contents)
|
98
95
|
end
|
@@ -290,7 +287,7 @@ def generate_tensor_options(function, opt_params)
|
|
290
287
|
code += "\n .#{c}"
|
291
288
|
end
|
292
289
|
|
293
|
-
"#{code}
|
290
|
+
"#{code};"
|
294
291
|
end
|
295
292
|
|
296
293
|
def generate_function_code(function, cpp_name, params, opt_index, remove_self)
|
data/lib/torch/version.rb
CHANGED