Skip to content

Commit

Permalink
change TORCH_LIBRARY to TORCH_LIBRARY_FRAGMENT to prevent conflict be…
Browse files Browse the repository at this point in the history
…tween cpu/mps
  • Loading branch information
metascroy committed Jan 30, 2025
1 parent 7815262 commit c08425b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"_linear_8bit_act_" #weight_nbit "bit_weight", \
&linear_meta<weight_nbit, true>);

TORCH_LIBRARY(torchao, m) {
TORCH_LIBRARY_FRAGMENT(torchao, m) {
DEFINE_OP(1);
DEFINE_OP(2);
DEFINE_OP(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Tensor pack_weights_cpu_kernel(const Tensor& W) {
return B;
}

TORCH_LIBRARY(torchao, m) {
TORCH_LIBRARY_FRAGMENT(torchao, m) {
m.def("_pack_weight_1bit(Tensor W) -> Tensor");
m.def("_pack_weight_2bit(Tensor W) -> Tensor");
m.def("_pack_weight_3bit(Tensor W) -> Tensor");
Expand Down

0 comments on commit c08425b

Please sign in to comment.