Update usages of torch.library APIs #8384
Dr.CI classification results
{"FAILED":[{"workflowId":9400074234,"workflowUniqueId":56905118,"id":25891668362,"runnerName":"i-026bc2ab81f6d1f36","authorEmail":"[email protected]","name":"Tests / unittests-linux (3.9, linux.12xlarge, cpu) / linux-job","jobName":"unittests-linux (3.9, linux.12xlarge, cpu) / linux-job","conclusion":"failure","completed_at":"2024-06-06T12:57:47Z","html_url":"https://github.com/pytorch/vision/actions/runs/9400074234/job/25891668362","head_branch":"rzou/fix_meta","pr_number":8384,"head_sha":"4520bd43d188048382f5ef2c698e3d784745468f","head_sha_timestamp":"2024-06-06T12:28:55+01:00","failure_captures":["test/test_ops.py::TestRoIAlign::test_autocast_cpu[rois_dtype1-x_dtype1-False-True]"],"failure_lines":["FAILED test/test_ops.py::TestRoIAlign::test_autocast_cpu[rois_dtype1-x_dtype1-False-True] - AssertionError: Tensor-likes are not close!"],"failure_context":["+ echo ::endgroup::","+ python -m torch.utils.collect_env","+ /opt/conda/bin/conda list","+ __conda_exe list","+ case "$cmd" in","+ local cmd=list","+ conda list","+ echo '::group::Collect environment information'","+ echo ::endgroup::","+ python setup.py develop","+ echo '::group::Install TorchVision'","+ echo ::endgroup::"],"time":"2024-06-06T12:57:51.432498Z"},{"workflowId":9400074234,"workflowUniqueId":56905118,"id":25891668997,"runnerName":"i-04370d4c487ccecd0","authorEmail":"[email protected]","name":"Tests / unittests-windows (3.9, windows.4xlarge, cpu) / windows-job","jobName":"unittests-windows (3.9, windows.4xlarge, cpu) / windows-job","conclusion":"failure","completed_at":"2024-06-06T12:52:35Z","html_url":"https://github.com/pytorch/vision/actions/runs/9400074234/job/25891668997","head_branch":"rzou/fix_meta","pr_number":8384,"head_sha":"4520bd43d188048382f5ef2c698e3d784745468f","head_sha_timestamp":"2024-06-06T12:28:55+01:00","failure_captures":["The process 'C:\Program Files\Git\cmd\git.exe' failed with exit code 128"],"failure_lines":["##[error]The process 'C:\Program Files\Git\cmd\git.exe' failed with exit code 128"],"failure_context":[],"time":"2024-06-06T13:03:26.964216Z"}],"FLAKY":[],"BROKEN_TRUNK":[],"UNSTABLE":[]}