Skip to content

Commit

Permalink
Updated LibTorch to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Apr 13, 2023
1 parent d1e6547 commit d8230d7
Show file tree
Hide file tree
Showing 8 changed files with 1,409 additions and 605 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ jobs:
os: ubuntu-22.04
- ruby: "3.0"
os: ubuntu-20.04
- ruby: 2.7
os: ubuntu-18.04
env:
LIBTORCH_VERSION: 1.13.1
LIBTORCH_VERSION: 2.0.0
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.13.0 (unreleased)

- Updated LibTorch to 2.0.0
- Dropped support for Ruby < 3

## 0.12.2 (2023-01-30)

- Added experimental support for DataPipes
Expand Down
6 changes: 4 additions & 2 deletions codegen/generate_functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ def generate_function_params(function, params, remove_self)
"memoryformat"
when "Storage"
"storage"
when "Layout"
"layout"
else
raise "Unknown type: #{param[:type]} (#{function.name})"
end
Expand Down Expand Up @@ -445,7 +447,7 @@ def generate_dispatch_code(function, def_method, params, opt_index, remove_self)
# torch::empty sets requires_grad by at::empty doesn't
# https://github.com/pytorch/pytorch/issues/36455
prefix = remove_self ? "self." : (opt_index ? "torch::" : "at::")
dispatch = function.dispatch_name
dispatch = nil # function.dispatch_name
unless dispatch
dispatch = function.base_name
dispatch += "_symint" if function.func.include?("SymInt")
Expand Down Expand Up @@ -640,7 +642,7 @@ def signature_type(param)
when "int"
"int64_t"
when "SymInt"
"c10::SymInt"
"SymInt"
when "float"
"double"
when "str"
Expand Down
Loading

0 comments on commit d8230d7

Please sign in to comment.