8000 Move amax implementations to compositeexplicit · pytorch/pytorch@ffdfa95 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffdfa95

Browse files
committed
Move amax implementations to compositeexplicit
1 parent a12a02b commit ffdfa95

File tree

1 file changed

+2
-7
lines changed
  • test/cpp_extensions/libtorch_agnostic_extension/libtorch_agnostic/csrc

1 file changed

+2
-7
lines changed

test/cpp_extensions/libtorch_agnostic_extension/libtorch_agnostic/csrc/kernel.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,6 @@ STABLE_TORCH_LIBRARY_FRAGMENT(libtorch_agnostic, m) {
388388

389389
STABLE_TORCH_LIBRARY_IMPL(libtorch_agnostic, CPU, m) {
390390
m.impl("my_zero_", &boxed_my_zero_);
391-
m.impl("my_amax", &boxed_my_amax);
392-
m.impl("my_amax_vec", &boxed_my_amax_vec);
393-
}
394-
395-
STABLE_TORCH_LIBRARY_IMPL(libtorch_agnostic, CUDA, m) {
396-
m.impl("my_amax", &boxed_my_amax);
397-
m.impl("my_amax_vec", &boxed_my_amax_vec);
398391
}
399392

400393
bool test_default_constructor(bool defined) {
@@ -430,6 +423,8 @@ STABLE_TORCH_LIBRARY_FRAGMENT(libtorch_agnostic, m) {
430423

431424
STABLE_TORCH_LIBRARY_IMPL(libtorch_agnostic, CompositeExplicitAutograd, m) {
432425
m.impl("test_default_constructor", &boxed_test_default_constructor);
426+
m.impl("my_amax", &boxed_my_amax);
427+
m.impl("my_amax_vec", &boxed_my_amax_vec);
433428
}
434429

435430
// Test functions for torch::stable::accelerator APIs

0 commit comments

Comments
 (0)
0