Skip to content

Commit 04fc7eb

Browse files
authored
fix test_air_top_p_sampling name (#3211)
1 parent 9f1936a commit 04fc7eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/operators/test_air_topp_sampling.py renamed to test/operators/test_air_top_p_sampling.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
"""UT for air_topp_sampling kernel"""
14+
"""UT for air_top_p_sampling kernel"""
1515

1616
import subprocess
1717
import unittest
@@ -36,19 +36,19 @@ def setUp(self):
3636
release_idx = output.index("release") + 1
3737
self.nvcc_cuda_version = float(output[release_idx].split(",")[0])
3838

39-
def test_air_topp_sampling(self):
39+
def test_air_top_p_sampling(self):
4040
"""
41-
Check air_topp_sampling output with paddle.tensor.top_p_sampling.
41+
Check air_top_p_sampling output with paddle.tensor.top_p_sampling.
4242
"""
4343
if self.nvcc_cuda_version < 12.0:
44-
self.skipTest("air_topp_sampling only support cu12+")
44+
self.skipTest("air_top_p_sampling only support cu12+")
4545
bsz = 8
4646
vocab_size = 103424
4747
x = paddle.randn([bsz, vocab_size])
4848
x = paddle.nn.functional.softmax(x)
4949
x = paddle.cast(x, "float32")
5050
top_ps = paddle.to_tensor(np.random.uniform(0, 1, [bsz]).astype(np.float32))
51-
_, next_tokens = fastdeploy.model_executor.ops.gpu.air_topp_sampling(
51+
_, next_tokens = fastdeploy.model_executor.ops.gpu.air_top_p_sampling(
5252
x.cuda(), top_ps.cuda(), None, None, seed=0, k=1, mode="truncated"
5353
)
5454
print(next_tokens)

0 commit comments

Comments
 (0)