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 to torch 2.6 api #1326

Merged
merged 2 commits into from
Feb 8, 2025
Merged

Update to torch 2.6 api #1326

merged 2 commits into from
Feb 8, 2025

Conversation

lifeiteng
Copy link
Contributor

No description provided.

@csukuangfj
Copy link
Collaborator

It is to fix the following warnings

[W208 02:23:37.349447793 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.349570128 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.358746014 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.358821207 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.368122618 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.368199218 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             [W208 02:23:37.377608647 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             [W208 02:23:37.377683656 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.393197835 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.393316662 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.393803866 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.393962727 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.394699073 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.394708386 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             [W208 02:23:37.394729735 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.628978514 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             
[W208 02:23:37.647001071 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)
[W208 02:23:37.647238219 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)                             [W208 02:23:37.647485439 Context.h:357] Warning: lazyInitCUDA is deprecated. Please use lazyInitDevice(at::kCUDA) instead. (function lazyInitCUDA)

#if K2_TORCH_VERSION_MAJOR > 2 || (K2_TORCH_VERSION_MAJOR == 2 && K2_TORCH_VERSION_MINOR >= 6)
at::globalContext().lazyInitDevice(torch::kCUDA);
#else
at::globalContext().lazyInitCUDA(torch::kCUDA);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
at::globalContext().lazyInitCUDA(torch::kCUDA);
at::globalContext().lazyInitCUDA();

@csukuangfj
Copy link
Collaborator

Thank you for your contribution!

@csukuangfj csukuangfj merged commit 0a09f67 into k2-fsa:master Feb 8, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants