Skip to content

Commit

Permalink
Adding 4.4.1 changes and nano 2GB support.
Browse files Browse the repository at this point in the history
  • Loading branch information
idavis committed Oct 22, 2020
1 parent d9e2cd7 commit e830ad2
Show file tree
Hide file tree
Showing 21 changed files with 4,740 additions and 40 deletions.
21 changes: 16 additions & 5 deletions generation/docker_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# P3668-0001 Production
# Jetson Nano P3448-0000 Supplied with developer kit
# P3448-0002 Production
# Jetson Nano P3448-0003 Supplied with developer kit 2GB
# Jetson AGX Xavier series P2888-0001 16 GB memory
# P2888-0004 32 GB memory
# P2888-0006 8 GB memory
Expand All @@ -33,6 +34,7 @@
"JETSON_TX2I": "P3489-0000",
"JETSON_TX1": "P2180-1000",
"JETSON_NANO_DEVKIT": "P3448-0000",
"JETSON_NANO_2GB_DEVKIT": "P3448-0003",
"JETSON_NANO": "P3448-0002"
}

Expand All @@ -53,6 +55,7 @@
"P2180-1000": "P2180-1000",
"P3448-0000": "P3448-0000",
"P3448-0002": "P3448-0002",
"P3448-0003": "P3448-0003",
"P3448-0020": "P3448-0002"
}

Expand Down Expand Up @@ -80,6 +83,7 @@ def get_current_device_id(device):
"P2180-1000": "Jetson TX1",
"P3448-0000": "Jetson Nano (Developer Kit version)",
"P3448-0002": "Jetson Nano",
"P3448-0003": "Jetson Nano (Developer Kit 2GB version)",
"P3448-0020": "Jetson Nano"
}

Expand All @@ -94,6 +98,7 @@ def get_current_device_id(device):
"P3489-0888": "jetson-tx2-4GB",
"P2180-1000": "jetson-tx1",
"P3448-0000": "jetson-nano-qspi-sd",
"P3448-0003": "jetson-nano-2gb-devkit",
"P3448-0002": "jetson-nano-emmc"
}

Expand All @@ -109,6 +114,7 @@ def get_current_device_id(device):
"P3489-0888": "jetson-tx2-devkit-4GB",
"P2180-1000": "jetson-tx1-devkit",
"P3448-0000": "jetson-nano-devkit",
"P3448-0003": "jetson-nano-2gb-devkit",
"P3448-0002": "jetson-nano-emmc"
}

Expand All @@ -123,7 +129,8 @@ def get_current_device_id(device):
"P3489-0888": "186",
"P2180-1000": "210",
"P3448-0000": "210",
"P3448-0002": "210"
"P3448-0002": "210",
"P3448-0003": "210",
}

deviceIdToShortNameLookup = {
Expand All @@ -144,7 +151,8 @@ def get_current_device_id(device):
"P2180-1000": "tx1",
"P3448-0000": "nano-dev",
"P3448-0020": "nano",
"P3448-0002": "nano"
"P3448-0002": "nano",
"P3448-0003": "nano-2gb-dev",
}

shortNameToDeviceIdLookup = {
Expand All @@ -158,10 +166,12 @@ def get_current_device_id(device):
"tx2-4gb": "P3489-0888",
"tx1": "P2180-1000",
"nano-dev": "P3448-0000",
"nano": "P3448-0002"
"nano": "P3448-0002",
"nano-2gb-dev": "P3448-0003",
}

active_versions = [
"4.4.1",
"4.4",

"4.3",
Expand All @@ -174,6 +184,7 @@ def get_current_device_id(device):
]

activeVersionsToSdkManagerVersionsLookup = {
"4.4.1": "4.4.1",
"4.4": "4.4",

"4.3": "4.3",
Expand All @@ -190,7 +201,7 @@ def get_current_device_id(device):
def get_tf_version_map():
tfmap = {}

tfmap["4.4"] = [
tfmap["4.4.1"] = [
{"url_suffix": "v44", "package" : "tensorflow", "version" : "1.15.2", "nv_version" :"20.4"},
{"url_suffix": "v44", "package" : "tensorflow", "version" : "1.15.3", "nv_version" : "20.7"},
{"url_suffix": "v44", "package" : "tensorflow", "version" : "1.15.2", "nv_version" : "20.6"},
Expand All @@ -202,6 +213,7 @@ def get_tf_version_map():
{"url_suffix": "v44", "package" : "tensorflow", "version" : "1.15.3", "nv_version" : "20.9"},
{"url_suffix": "v44", "package" : "tensorflow", "version" : "2.3.0", "nv_version" : "20.9"},
]
tfmap["4.4"] = tfmap["4.4.1"]
tfmap["4.3"] = [
{"url_suffix": "v43", "package" : "tensorflow_gpu", "version" : "2.0.0", "nv_version" : "19.12"},
{"url_suffix": "v43", "package" : "tensorflow_gpu", "version" : "1.15.0", "nv_version" : "19.12"},
Expand Down Expand Up @@ -385,7 +397,6 @@ def generate_l4t_makefile(self, context, template_filepath):

def generate_l4t_makefile_context(self):
make_context = {}
filename = "l4t.yml"
for jetpack_version in active_versions:
context_file = pathlib.Path(f"dist/{jetpack_version}/l4t.yml")
context = self.read_yml_dictionary(context_file)
Expand Down
28 changes: 25 additions & 3 deletions generation/manifest_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"JETSON_TX2I": "P3489-0000",
"JETSON_TX1": "P2180-1000",
"JETSON_NANO_DEVKIT": "P3448-0000",
"JETSON_NANO_2GB_DEVKIT": "P3448-0003",
"JETSON_NANO": "P3448-0002"
}

Expand All @@ -41,6 +42,7 @@
"P2180-1000": "P2180-1000",
"P3448-0000": "P3448-0000",
"P3448-0002": "P3448-0002",
"P3448-0003": "P3448-0003",
"P3448-0020": "P3448-0002"
}

Expand All @@ -61,6 +63,7 @@
"P2180-1000",
"P3448-0000",
"P3448-0002",
"P3448-0003",
"P3448-0020",
]

Expand Down Expand Up @@ -97,6 +100,11 @@ def get_current_device_id(device):
}

active_manifests = {
"4.4.1": {
"manifest": os.path.join(sys.path[0], "./manifests/sdkml3_jetpack_l4t_441.json"),
"additionalsdk": os.path.join(sys.path[0], "./manifests/sdkml3_jetpack_l4t_441_deepstream.json")
},

"4.4": {
"manifest": os.path.join(sys.path[0], "./manifests/sdkml3_jetpack_l4t_44_ga.json"),
"additionalsdk": os.path.join(sys.path[0], "./manifests/sdkml3_jetpack_l4t_44_ga_deepstream.json")
Expand Down Expand Up @@ -282,6 +290,8 @@ def build_component_definitions(self, context, datastore, selectedGroups, operat
if fileContext["version"] == "32.4":
if "32.4.3" in fileContext["fileName"]:
fileContext["version"] = "32.4.3"
if "32.4.4" in fileContext["fileName"]:
fileContext["version"] = "32.4.4"
componentFileName = self.get_component_file_name(
componentName,
fileContext)
Expand Down Expand Up @@ -513,6 +523,15 @@ def load_additional_sdks(self, datastore, current_jetpack):
filepath = current_jetpack["additionalsdk"]
sdk = self.open_json_file(filepath)

# Schema versions flip between lists and dictionaries :(
if type(sdk["groups"]) is list:
groups = {}
values = sdk["groups"][1::2]
keys = sdk["groups"][::2]
for idx, val in enumerate(keys):
groups[val] = values[idx]
sdk["groups"] = groups

groups = sdk["groups"]
for key in groups.keys():
group = groups[key]
Expand Down Expand Up @@ -550,9 +569,12 @@ def main(self, datastore, jetpack_version, current_jetpack):
self.build_jetpack_context(datastore)

def validate_manifest_schema(self, datastore):
if datastore["information"]["schemaVersion"] != "4.0":
raise Exception(
"Version 4.0 schema required")
schemaVersion = datastore["information"]["schemaVersion"]
if schemaVersion != "4.0" and schemaVersion != "8.0":
raise Exception(
"Version 4.0 or 8.0 schema required")

# Schema versions flip between lists and dictionaries :(
groups = {}
values = datastore["groups"][1::2]
keys = datastore["groups"][::2]
Expand Down
Loading

0 comments on commit e830ad2

Please sign in to comment.