-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from trustimaging/save-bounds-hotfix
Fix compatibility issue with torch
- Loading branch information
Showing
10 changed files
with
6,885 additions
and
16,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
source ~/.bashrc | ||
jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root | ||
imrun notebook --ip=0.0.0.0 --port=8888 --allow-root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
import re | ||
import os | ||
import sys | ||
|
||
|
||
def go(): | ||
# Get CUDA compilers path | ||
comp_path = None | ||
|
||
# Try to get from environment variables | ||
envs = ['CUDA_HOME', 'NVHPC_CUDA_HOME', 'CUDA_ROOT'] | ||
for env in envs: | ||
cuda_home = os.environ.get(env, None) | ||
if cuda_home: | ||
comp_path = os.path.join(os.path.join(os.path.dirname(cuda_home), 'compilers'), 'lib') | ||
break | ||
|
||
if comp_path is None: | ||
hpcsdk_home = os.environ.get('HPCSDK_HOME') | ||
if hpcsdk_home: | ||
comp_path = os.path.join(os.path.join(hpcsdk_home, 'compilers'), 'lib') | ||
|
||
# If not, try to get from LD_LIBRARY_PATH | ||
if comp_path is None: | ||
library_path = os.environ.get('LD_LIBRARY_PATH', '') | ||
for path in library_path.split(':'): | ||
if re.match('.*/nvidia/hpc_sdk/.*/?compilers/lib', path) or \ | ||
re.match('.*/nvhpc/.*/?compilers/lib', path): | ||
comp_path = path | ||
|
||
if comp_path is None or not os.path.exists(comp_path): | ||
return '' | ||
|
||
# Now try to get libgomp path | ||
libnames = ['libgomp', 'libiomp', 'libomp'] | ||
extnames = ['.so', '.dylib', '.dll'] | ||
for lib in libnames: | ||
for ext in extnames: | ||
lib_path = os.path.join(comp_path, lib + ext) | ||
if os.path.exists(lib_path): | ||
return lib_path | ||
|
||
return '' | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(go()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
preload=$((findomp) 2>&1) | ||
LD_PRELOAD="$preload" jupyter "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
preload=$((findomp) 2>&1) | ||
LD_PRELOAD="$preload" mrun_ "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.