Skip to content

Commit 39dd340

Browse files
authored
Change TORCH_LIBRARY to TORCH_LIBRARY_FRAGMENT (#1645)
* change TORCH_LIBRARY to TORCH_LIBRARY_FRAGMENT to prevent conflict between cpu/mps * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up * up
1 parent d99785c commit 39dd340

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchao/experimental/ops/linear_8bit_act_xbit_weight/op_linear_8bit_act_xbit_weight_aten.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"_linear_8bit_act_" #weight_nbit "bit_weight", \
6161
&linear_meta<weight_nbit, true>);
6262

63-
TORCH_LIBRARY(torchao, m) {
63+
TORCH_LIBRARY_FRAGMENT(torchao, m) {
6464
DEFINE_OP(1);
6565
DEFINE_OP(2);
6666
DEFINE_OP(3);

torchao/experimental/ops/mps/linear_fp_act_xbit_weight_aten.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Tensor pack_weights_cpu_kernel(const Tensor& W) {
163163
return B;
164164
}
165165

166-
TORCH_LIBRARY(torchao, m) {
166+
TORCH_LIBRARY_FRAGMENT(torchao, m) {
167167
m.def("_pack_weight_1bit(Tensor W) -> Tensor");
168168
m.def("_pack_weight_2bit(Tensor W) -> Tensor");
169169
m.def("_pack_weight_3bit(Tensor W) -> Tensor");

0 commit comments

Comments
 (0)