forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organize SLL ops, pt 9 (pytorch#3665)
Summary: Pull Request resolved: pytorch#3665 X-link: facebookresearch/FBGEMM#740 - Move cpu_sll and meta_sll to their own folders Differential Revision: D69227334
- Loading branch information
1 parent
3a1ba59
commit 6db71dc
Showing
5 changed files
with
118 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# pyre-strict | ||
|
||
from fbgemm_gpu.sll.cpu.cpu_sll import ( # noqa F401 | ||
cpu_array_jagged_bmm_jagged_out, | ||
cpu_dense_jagged_cat_jagged_out, | ||
cpu_jagged2_softmax, | ||
cpu_jagged2_to_padded_dense, | ||
cpu_jagged_dense_bmm, | ||
cpu_jagged_dense_elementwise_add, | ||
cpu_jagged_dense_elementwise_mul_jagged_out, | ||
cpu_jagged_dense_flash_attention, | ||
cpu_jagged_flash_attention_basic, | ||
cpu_jagged_jagged_bmm, | ||
cpu_jagged_jagged_bmm_jagged_out, | ||
cpu_jagged_self_substraction_jagged_out, | ||
cpu_jagged_softmax, | ||
) | ||
|
||
# pyre-ignore[5] | ||
op_registrations = { | ||
"sll_jagged_dense_bmm": { | ||
"CPU": cpu_jagged_dense_bmm, | ||
"AutogradCPU": cpu_jagged_dense_bmm, | ||
}, | ||
"sll_jagged_jagged_bmm": { | ||
"CPU": cpu_jagged_jagged_bmm, | ||
"AutogradCPU": cpu_jagged_jagged_bmm, | ||
}, | ||
"sll_dense_jagged_cat_jagged_out": { | ||
"CPU": cpu_dense_jagged_cat_jagged_out, | ||
}, | ||
"sll_jagged_self_substraction_jagged_out": { | ||
"CPU": cpu_jagged_self_substraction_jagged_out, | ||
}, | ||
"sll_jagged2_to_padded_dense": { | ||
"CPU": cpu_jagged2_to_padded_dense, | ||
"AutogradCPU": cpu_jagged2_to_padded_dense, | ||
}, | ||
"sll_jagged_dense_elementwise_mul_jagged_out": { | ||
"CPU": cpu_jagged_dense_elementwise_mul_jagged_out, | ||
"AutogradCPU": cpu_jagged_dense_elementwise_mul_jagged_out, | ||
}, | ||
"sll_jagged_softmax": { | ||
"CPU": cpu_jagged_softmax, | ||
"AutogradCPU": cpu_jagged_softmax, | ||
}, | ||
"sll_jagged2_softmax": { | ||
"CPU": cpu_jagged2_softmax, | ||
"AutogradCPU": cpu_jagged2_softmax, | ||
}, | ||
"sll_array_jagged_bmm_jagged_out": { | ||
"CPU": cpu_array_jagged_bmm_jagged_out, | ||
"AutogradCPU": cpu_array_jagged_bmm_jagged_out, | ||
}, | ||
"sll_jagged_jagged_bmm_jagged_out": { | ||
"CPU": cpu_jagged_jagged_bmm_jagged_out, | ||
"AutogradCPU": cpu_jagged_jagged_bmm_jagged_out, | ||
}, | ||
"sll_jagged_flash_attention_basic": { | ||
"CPU": cpu_jagged_flash_attention_basic, | ||
"AutogradCPU": cpu_jagged_flash_attention_basic, | ||
}, | ||
"sll_jagged_dense_elementwise_add": { | ||
"CPU": cpu_jagged_dense_elementwise_add, | ||
"AutogradCPU": cpu_jagged_dense_elementwise_add, | ||
}, | ||
"sll_jagged_dense_flash_attention": { | ||
"CPU": cpu_jagged_dense_flash_attention, | ||
"AutogradCPU": cpu_jagged_dense_flash_attention, | ||
}, | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# pyre-strict | ||
|
||
from fbgemm_gpu.sll.meta.meta_sll import ( # noqa F401 | ||
meta_array_jagged_bmm_jagged_out, | ||
meta_jagged2_softmax, | ||
meta_jagged_dense_elementwise_mul_jagged_out, | ||
meta_jagged_jagged_bmm_jagged_out, | ||
meta_jagged_self_substraction_jagged_out, | ||
) | ||
|
||
# pyre-ignore[5] | ||
op_registrations = { | ||
"sll_jagged_self_substraction_jagged_out": { | ||
"Meta": meta_jagged_self_substraction_jagged_out, | ||
}, | ||
"sll_jagged_dense_elementwise_mul_jagged_out": { | ||
"Meta": meta_jagged_dense_elementwise_mul_jagged_out, | ||
}, | ||
"sll_jagged2_softmax": { | ||
"AutogradMeta": meta_jagged2_softmax, | ||
}, | ||
"sll_array_jagged_bmm_jagged_out": { | ||
"AutogradMeta": meta_array_jagged_bmm_jagged_out, | ||
}, | ||
"sll_jagged_jagged_bmm_jagged_out": { | ||
"AutogradMeta": meta_jagged_jagged_bmm_jagged_out, | ||
}, | ||
} |
File renamed without changes.