Skip to content

Commit 119c587

Browse files
author
Zafar Takhirov
committed
Update on "[quant] Adding Scalar add/mul."
Note: This should be landed ONLY after #24259 Pull Request resolved: #24447 Differential Revision: [D16846006](https://our.internmc.facebook.com/intern/diff/D16846006)
2 parents 95a3e93 + 961c9f4 commit 119c587

File tree

249 files changed

+7019
-2948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+7019
-2948
lines changed

.circleci/cimodel/data/pytorch_build_data.py

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
CONFIG_TREE_DATA = [
7-
("trusty", [
7+
("xenial", [
88
(None, [
99
XImportant("2.7.9"),
1010
X("2.7"),
@@ -16,21 +16,23 @@
1616
("5.4", [
1717
XImportant("3.6"),
1818
("3.6", [
19-
("xla", [XImportant(True)]),
2019
("namedtensor", [XImportant(True)]),
2120
]),
2221
]),
2322
("7", [X("3.6")]),
2423
]),
25-
]),
26-
("xenial", [
2724
("clang", [
2825
("5", [
2926
XImportant("3.6"), # This is actually the ASAN build
3027
("3.6", [
3128
("namedtensor", [XImportant(True)]), # ASAN
3229
]),
3330
]),
31+
("7", [
32+
("3.6", [
33+
("xla", [XImportant(True)]),
34+
]),
35+
]),
3436
]),
3537
("cuda", [
3638
("9", [
@@ -96,34 +98,11 @@ def child_constructor(self):
9698
distro = self.find_prop("distro_name")
9799

98100
next_nodes = {
99-
"trusty": TrustyCompilerConfigNode,
100101
"xenial": XenialCompilerConfigNode,
101102
}
102103
return next_nodes[distro]
103104

104105

105-
class TrustyCompilerConfigNode(TreeConfigNode):
106-
107-
def modify_label(self, label):
108-
return label or "<unspecified>"
109-
110-
def init2(self, node_name):
111-
self.props["compiler_name"] = node_name
112-
113-
def child_constructor(self):
114-
return TrustyCompilerVersionConfigNode if self.props["compiler_name"] else PyVerConfigNode
115-
116-
117-
class TrustyCompilerVersionConfigNode(TreeConfigNode):
118-
119-
def init2(self, node_name):
120-
self.props["compiler_version"] = node_name
121-
122-
# noinspection PyMethodMayBeStatic
123-
def child_constructor(self):
124-
return PyVerConfigNode
125-
126-
127106
class PyVerConfigNode(TreeConfigNode):
128107
def init2(self, node_name):
129108
self.props["pyver"] = node_name
@@ -184,12 +163,16 @@ def get_children(self):
184163

185164
class XenialCompilerConfigNode(TreeConfigNode):
186165

166+
def modify_label(self, label):
167+
return label or "<unspecified>"
168+
187169
def init2(self, node_name):
188170
self.props["compiler_name"] = node_name
189171

190172
# noinspection PyMethodMayBeStatic
191173
def child_constructor(self):
192-
return XenialCompilerVersionConfigNode
174+
175+
return XenialCompilerVersionConfigNode if self.props["compiler_name"] else PyVerConfigNode
193176

194177

195178
class XenialCompilerVersionConfigNode(TreeConfigNode):

.circleci/cimodel/data/pytorch_build_definitions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
DOCKER_IMAGE_PATH_BASE = "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/"
1616

17-
DOCKER_IMAGE_VERSION = 327
17+
DOCKER_IMAGE_VERSION = 336
1818

1919

2020
@dataclass
@@ -133,7 +133,6 @@ def __init__(self, name, parent_build=None):
133133
self.parent_build = parent_build
134134

135135
def gen_workflow_yaml_item(self, phase):
136-
137136
return {self.gen_build_name(phase): {"requires": [self.parent_build.gen_build_name("build")]}}
138137

139138
def gen_build_name(self, _):
@@ -193,16 +192,16 @@ def instantiate_configs():
193192
for fc in found_configs:
194193

195194
distro_name = fc.find_prop("distro_name")
195+
compiler_name = fc.find_prop("compiler_name")
196+
is_xla = fc.find_prop("is_xla") or False
196197

197198
python_version = None
198-
if distro_name == "xenial":
199+
if compiler_name == "cuda" or compiler_name == "android":
199200
python_version = fc.find_prop("pyver")
200201
parms_list = [fc.find_prop("abbreviated_pyver")]
201202
else:
202203
parms_list = ["py" + fc.find_prop("pyver")]
203204

204-
compiler_name = fc.find_prop("compiler_name")
205-
206205
cuda_version = None
207206
if compiler_name == "cuda":
208207
cuda_version = fc.find_prop("compiler_version")
@@ -219,14 +218,15 @@ def instantiate_configs():
219218
parms_list.append(gcc_version)
220219

221220
# TODO: This is a nasty special case
222-
if compiler_name == "clang":
221+
if compiler_name == "clang" and not is_xla:
223222
parms_list.append("asan")
223+
python_version = fc.find_prop("pyver")
224+
parms_list[0] = fc.find_prop("abbreviated_pyver")
224225

225226
if cuda_version in ["9.2", "10", "10.1"]:
226227
# TODO The gcc version is orthogonal to CUDA version?
227228
parms_list.append("gcc7")
228229

229-
is_xla = fc.find_prop("is_xla") or False
230230
is_namedtensor = fc.find_prop("is_namedtensor") or False
231231
is_important = fc.find_prop("is_important") or False
232232

0 commit comments

Comments
 (0)