Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 5th No.11】add gammaincc and gammainc API #59357

Merged
merged 29 commits into from
Jan 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9bc8ff5
【Hackathon 5th No.11】add igamma and igammac API
GreatV Nov 24, 2023
e2975de
fix bug
GreatV Nov 24, 2023
77fa04c
Merge branch 'develop' into add_igamma_igammac
GreatV Nov 28, 2023
93b329c
Merge branch 'develop' into add_igamma_igammac
GreatV Nov 28, 2023
26b8fea
Merge branch 'develop' into add_igamma_igammac
GreatV Nov 28, 2023
c753bbc
fix codestyle
GreatV Nov 28, 2023
95ab00e
Merge branch 'develop' into add_igamma_igammac
GreatV Dec 18, 2023
72d9733
fix bug
GreatV Dec 18, 2023
7bb8331
update ut
GreatV Dec 18, 2023
698b168
Merge branch 'develop' into add_igamma_igammac
GreatV Dec 18, 2023
be0902b
fix bug
GreatV Dec 18, 2023
a305761
fix bug
GreatV Dec 18, 2023
e35b378
add test inplace
GreatV Dec 19, 2023
00b9c41
fix bug
GreatV Dec 19, 2023
64c8fdb
fix bug
GreatV Dec 19, 2023
df1cd20
remove unused comment
GreatV Dec 19, 2023
42cc077
remove some c++ impl
GreatV Dec 20, 2023
3d2a1d1
update code
GreatV Dec 24, 2023
47fcd00
Merge branch 'develop' into add_igamma_igammac
GreatV Dec 24, 2023
623f01f
fix bug
GreatV Dec 24, 2023
56e5ce8
fix bug
GreatV Dec 25, 2023
faf3757
update
GreatV Dec 27, 2023
ad0e1cc
remove some paddle.enable_static()
GreatV Jan 4, 2024
ac25528
remove eigen impl
GreatV Jan 8, 2024
8f96075
Merge branch 'develop' into add_igamma_igammac
GreatV Jan 8, 2024
d7c1b59
fix test_inplace
GreatV Jan 9, 2024
cb34836
Merge branch 'develop' into add_igamma_igammac
GreatV Jan 22, 2024
af72a5c
rename op
GreatV Jan 23, 2024
ec4b0de
igamma(a, x) -> gammaincc(x, y)
GreatV Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion test/legacy_test/test_igamma_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,34 @@ def test_a_le_zero_error(self):
self.assertRaises(ValueError, paddle.igamma, x, a)
paddle.enable_static()

def test_dtype_error(self):
paddle.enable_static()
# in static graph mode
with self.assertRaises(TypeError):
with paddle.static.program_guard(paddle.static.Program()):
x = paddle.static.data(
name="x", shape=self.shape, dtype="int32"
)
a = paddle.static.data(
name="a", shape=self.shape, dtype="int32"
)
out = paddle.igamma(x, a)

paddle.disable_static()
# in dynamic mode
with self.assertRaises(RuntimeError):
with paddle.base.dygraph.guard():
x = paddle.to_tensor(self.x_np, dtype="int32")
a = paddle.to_tensor(self.a_np, dtype="int32")
res = paddle.igamma(x, a)

paddle.enable_static()
GreatV marked this conversation as resolved.
Show resolved Hide resolved


class TestIgammaOpFp32Api(TestIgammaOpApi):
def init_dtype_type(self):
GreatV marked this conversation as resolved.
Show resolved Hide resolved
self.dtype = "float32"


if __name__ == "__main__":
paddle.enable_static()
unittest.main()