Skip to content

Commit

Permalink
orlando - for updates of support 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
llv22 committed Feb 27, 2024
1 parent 3322cd3 commit c3959b7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
17 changes: 16 additions & 1 deletion migration_note.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,19 @@ torch 2.0.0
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
```

change torch/csrc/utils/pybind.h with
change torch/csrc/utils/pybind.h with cast_type.

## 5. Building pytorch.vision 0.17.1

Issue: not found /usr/local/cuda/lib/libcudnn.a

Try with the following solution:

```bash
sudo ln -s /usr/local/torch/lib/libdnnl.a /usr/local/lib/libdnnl.a
sudo ln -s /usr/local/torch/lib/libc10_cuda.dylib /usr/local/lib/libc10_cuda.dylib
sudo ln -s /usr/local/torch/lib/libc10.dylib /usr/local/lib/libc10.dylib
sudo ln -s /usr/local/torch/lib/libtorch_cpu.dylib /usr/local/lib/libtorch_cpu.dylib
sudo ln -s /usr/local/torch/lib/libtorch_cuda.dylib /usr/local/lib/libtorch_cuda.dylib
sudo ln -s /usr/local/torch/lib/libtorch.dylib /usr/local/lib/libtorch.dylib
```
9 changes: 5 additions & 4 deletions torch/csrc/utils/pybind.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,11 @@ struct type_caster<c10::complex<T>> {
template <typename T>
struct type_caster<c10::optional<T>> : optional_caster<c10::optional<T>> {};

template <typename... Ts>
struct C10_MPARK_VISIBILITY_HIDDEN type_caster<c10::variant<Ts...>>
: variant_caster<c10::variant<Ts...>> {};
#endif
//see: redefinition /Users/llv23/opt/miniconda3/lib/python3.10/site-packages/torch/include/pybind11/stl.h:441:8: note: previous definition is here
// template <typename... Ts>
// struct C10_MPARK_VISIBILITY_HIDDEN type_caster<c10::variant<Ts...>>
// : variant_caster<c10::variant<Ts...>> {};
// #endif

} // namespace detail
} // namespace pybind11
Expand Down
2 changes: 1 addition & 1 deletion torch/utils/cpp_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ def sanitize_flags(flags):

def replace_std17_with_std14(options):
options = [c for c in options if c != "-std=c++17"]
if options.find("-std=c++14") == -1:
if "-std=c++14" not in options:
options.append("-std=c++14")
return options

Expand Down

0 comments on commit c3959b7

Please sign in to comment.