CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 03:04:23 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/PaddlePaddle/Paddle.git
etag: W/"562e88ac245afd858939f3ea5b5fb0fc"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=5iyrhtG4hD1kOKdk0i2KY9vpI5EsdOSLrDGq45Xp135UEvSRjFhQM7bbZ81j5yDY9wBLKE9RBmMdcrZ87K64%2FRkwH0VzZofYHrgmpaeR8doONa9oAqu1YB7xzYptXPSpPmppXHrfOgkvyq95zMrDSdjB2hrWtsBhWsFA0z4M%2B0sf1gxNi1%2Fkpb5hNJnL%2BvL2GrJElC7j7lQkB2pQnETqIcR%2BfBEebd6yMeh5qiLcXAwkTCJX0UdmHfR1NFQtEr8qTNIATWL9lcG1jvlXHz6P9A%3D%3D--LlO9Qz80fUxIEWUm--I%2BZbDhrjYvvor%2Bj%2FJd6L5w%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1348599909.1753499062; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 03:04:22 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 26 Jul 2026 03:04:22 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9768:91727:EB9A2:16FA14:688445B6
【Paddle Tensor No.8、9、14、15】为Tensor新增`__rshift__`,`__lshift__`,`__rls… · PaddlePaddle/Paddle@138ac11 · GitHub
Copy file name to clipboardExpand all lines: python/paddle/tensor/__init__.py
Copy file name to clipboardExpand all lines: python/paddle/tensor/math.py
Copy file name to clipboardExpand all lines: test/legacy_test/test_bitwise_shift_op.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit 138ac11
authored
* update
* fix:update expected output
* fix:`_rrshift__` -> `__rrshift__`
* feat: use `paddle.to_tensor` to support int input,and raise TypeError for float
* 📝 docs:remove docstring of magic method
* test:add test for `__lshift__`,`__rshift__`,`__rlshift__`,`__rrshift__`,`__rshift__`cannot pass ref_right_shift_logical
`__rshift__` cannot pass TestBitwiseRightShiftAPI.test_static_api_logical and test_dygraph_api_arithmetic
* test: use `x.__rrshift__(y,False)` to send is_arithmetic
* test: keep it as the same.
使用__rshift__而不是__rrshift__,使用__lshift__,而不是__rlshift__
* chore: remove `out` and `name`
* fix: 直接继承TestCase来进行不同类型测试
* test: add more test in uint8,int8,int16 for `__rlshift__` and `__rrshift__`
* typos: raises TypeError between `'float' and 'Tensor'` and `'Tensor' and 'float'`
* test: add test for `TypeError` in float
* typo: `bool` -> `float`
1 parent 3a8618e commit 138ac11Copy full SHA for 138ac11
File tree
Expand file treeCollapse file tree
3 files changed
+241
-0
lines changedFilter options
- python/paddle/tensor
- test/legacy_test
Expand file treeCollapse file tree
3 files changed
+241
-0
lines changedpython/paddle/tensor/__init__.py
Copy file name to clipboardExpand all lines: python/paddle/tensor/__init__.py+8Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
221 | 221 |
| |
222 | 222 |
| |
223 | 223 |
| |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
224 | 228 |
| |
225 | 229 |
| |
226 | 230 |
| |
| |||
862 | 866 |
| |
863 | 867 |
| |
864 | 868 |
| |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
865 | 873 |
|
python/paddle/tensor/math.py
Copy file name to clipboardExpand all lines: python/paddle/tensor/math.py+57Lines changed: 57 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7769 | 7769 |
| |
7770 | 7770 |
| |
7771 | 7771 |
| |
| 7772 | + | |
| 7773 | + | |
| 7774 | + | |
| 7775 | + | |
| 7776 | + | |
| 7777 | + | |
| 7778 | + | |
| 7779 | + | |
| 7780 | + | |
| 7781 | + | |
| 7782 | + | |
| 7783 | + | |
| 7784 | + | |
| 7785 | + | |
| 7786 | + | |
| 7787 | + | |
| 7788 | + | |
| 7789 | + | |
| 7790 | + | |
| 7791 | + | |
| 7792 | + | |
| 7793 | + | |
| 7794 | + | |
| 7795 | + | |
| 7796 | + | |
| 7797 | + | |
| 7798 | + | |
| 7799 | + | |
| 7800 | + | |
| 7801 | + | |
| 7802 | + | |
| 7803 | + | |
| 7804 | + | |
| 7805 | + | |
| 7806 | + | |
| 7807 | + | |
| 7808 | + | |
| 7809 | + | |
| 7810 | + | |
| 7811 | + | |
| 7812 | + | |
| 7813 | + | |
| 7814 | + | |
| 7815 | + | |
| 7816 | + | |
| 7817 | + | |
| 7818 | + | |
| 7819 | + | |
| 7820 | + | |
| 7821 | + | |
| 7822 | + | |
| 7823 | + | |
| 7824 | + | |
| 7825 | + | |
| 7826 | + | |
| 7827 | + | |
| 7828 | + | |
7772 | 7829 |
| |
7773 | 7830 |
| |
7774 | 7831 |
| |
|
test/legacy_test/test_bitwise_shift_op.py
Copy file name to clipboardExpand all lines: test/legacy_test/test_bitwise_shift_op.py+176Lines changed: 176 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
| 86 | + | |
86 | 87 |
| |
87 | 88 |
| |
| 89 | + | |
88 | 90 |
| |
89 | 91 |
| |
| 92 | + | |
90 | 93 |
| |
91 | 94 |
| |
92 | 95 |
| |
| |||
96 | 99 |
| |
97 | 100 |
| |
98 | 101 |
| |
| 102 | + | |
99 | 103 |
| |
100 | 104 |
| |
| 105 | + | |
101 | 106 |
| |
102 | 107 |
| |
103 | 108 |
| |
| |||
106 | 111 |
| |
107 | 112 |
| |
108 | 113 |
| |
| 114 | + | |
109 | 115 |
| |
110 | 116 |
| |
| 117 | + | |
111 | 118 |
| |
112 | 119 |
| |
| 120 | + | |
113 | 121 |
| |
114 | 122 |
| |
115 | 123 |
| |
116 | 124 |
| |
117 | 125 |
| |
118 | 126 |
| |
| 127 | + | |
119 | 128 |
| |
120 | 129 |
| |
| 130 | + | |
121 | 131 |
| |
122 | 132 |
| |
123 | 133 |
| |
| |||
235 | 245 |
| |
236 | 246 |
| |
237 | 247 |
| |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
238 | 309 |
| |
239 | 310 |
| |
240 | 311 |
| |
| |||
257 | 328 |
| |
258 | 329 |
| |
259 | 330 |
| |
| 331 | + | |
260 | 332 |
| |
261 | 333 |
| |
| 334 | + | |
262 | 335 |
| |
263 | 336 |
| |
| 337 | + | |
264 | 338 |
| |
265 | 339 |
| |
266 | 340 |
| |
| |||
270 | 344 |
| |
271 | 345 |
| |
272 | 346 |
| |
| 347 | + | |
273 | 348 |
| |
274 | 349 |
| |
| 350 | + | |
275 | 351 |
| |
276 | 352 |
| |
277 | 353 |
| |
| |||
280 | 356 |
| |
281 | 357 |
| |
282 | 358 |
| |
| 359 | + | |
283 | 360 |
| |
284 | 361 |
| |
| 362 | + | |
285 | 363 |
| |
286 | 364 |
| |
| 365 | + | |
287 | 366 |
| |
288 | 367 |
| |
289 | 368 |
| |
290 | 369 |
| |
291 | 370 |
| |
292 | 371 |
| |
| 372 | + | |
293 | 373 |
| |
294 | 374 |
| |
| 375 | + | |
295 | 376 |
| |
296 | 377 |
| |
297 | 378 |
| |
| |||
409 | 490 |
| |
410 | 491 |
| |
411 | 492 |
| |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
412 | 588 |
| |
413 | 589 |
| |
414 | 590 |
|
You can’t perform that action at this time.
0 commit comments