Logo
Explore Help
Sign In
OSSForks/pytorch
1
0
Fork 0
You've already forked pytorch
mirror of https://github.com/zebrajr/pytorch.git synced 2026-01-15 12:15:51 +00:00
Code Issues Actions 52 Packages Projects Releases Wiki Activity
Files
7c825bad10fa81e330f8ecd4e8cac5aa17143b21
pytorch/test/expect/TestScript.test_python_frontend_py3.expect

11 lines
192 B
Plaintext
Raw Normal View History

First step at adding exceptions (#12789) Summary: This is a first step towards adding exceptions. We need minimal support in order to begin converting the torch library to weak script mode (which is the main goal here). Some limitations (that are documented in the tests & compiler): 1. Cannot assign exceptions to variables 2. Any name after raise is being treated as a valid Exception 3. No control flow analysis yet. Below a will be undefined: if True: a = 1 else: raise Exception("Hi") return a Pull Request resolved: https://github.com/pytorch/pytorch/pull/12789 Differential Revision: D12848936 Pulled By: eellison fbshipit-source-id: 1f60ceef2381040486123ec797e97d65b074862d
2018-10-30 20:20:26 -07:00
(def
(ident fn)
(decl (list) (option))
(list
(raise
(option
(apply
(variable (ident Exception))
(list (string_literal hello))
(list))))))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 1331ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API