mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
MoE backward improvements (#2335)
This commit is contained in:
committed by
GitHub
parent
a4fcc893cd
commit
4a9b29a875
@@ -526,6 +526,16 @@ class GatherMM : public UnaryPrimitive {
|
||||
bool right_sorted_;
|
||||
};
|
||||
|
||||
class SegmentedMM : public UnaryPrimitive {
|
||||
public:
|
||||
explicit SegmentedMM(Stream stream) : UnaryPrimitive(stream) {}
|
||||
|
||||
void eval_cpu(const std::vector<array>& inputs, array& out) override;
|
||||
void eval_gpu(const std::vector<array>& inputs, array& out) override;
|
||||
|
||||
DEFINE_PRINT(SegmentedMM)
|
||||
};
|
||||
|
||||
class BroadcastAxes : public UnaryPrimitive {
|
||||
public:
|
||||
explicit BroadcastAxes(Stream stream, std::vector<int> ignore_axes = {})
|
||||
|
||||
Reference in New Issue
Block a user