Skip to content

Commit b46fe51

Browse files
committed
dropout:ompsimd+cuda的实现
1 parent 4992e78 commit b46fe51

File tree

2 files changed

+12
-0
lines changed
  • doc/excuter/op-mem-ompsimd
  • excuter/op-mem-ompsimd/src/client

2 files changed

+12
-0
lines changed

doc/excuter/op-mem-ompsimd/list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
| Operation | Author | Math Formula | IR Instruction |
5151
|-----------|--------|--------------|----------------|
52+
| dropout | miaobyte | A.dropout(p,seed)->C | dropout(tensor<any> A, var<float32> p, var<int32> seed)->(tensor<any> C) |
5253
| switch | miaobyte | C=switch([tensors],case) | switch(listtensor<any> tensors, tensor<int8> cases)->(tensor<any> C) |
5354
| greaterscalar | miaobyte | mask=greater(T1,scalar) | greaterscalar(tensor<any> A, var<any> scalar)->(tensor<bool> mask) |
5455
| equalscalar | miaobyte | mask=equal(T1,scalar) | equalscalar(tensor<any> A, var<any> scalar)->(tensor<bool> mask) |

excuter/op-mem-ompsimd/src/client/tfs.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,17 @@ namespace deepx::tf
465465
{
466466
Param("C", DataCategory::Tensor, Precision::Any),
467467
})));
468+
// dropout author=miaobyte
469+
tffactory.add_tf(std::make_shared<Dropout<miaobyte>>(vector<Param>(
470+
{
471+
Param("A", DataCategory::Tensor, Precision::Any),
472+
Param("p", DataCategory::Var, Precision::Float32),
473+
Param("seed", DataCategory::Var, Precision::Int32),
474+
}),
475+
vector<Param>(
476+
{
477+
Param("C", DataCategory::Tensor, Precision::Any),
478+
}) ));
468479
}
469480
// matmul
470481
void register_matmul(TfFactory &tffactory)

0 commit comments

Comments
 (0)