Skip to content

[RUNTIME] Proper Device Attribute Query for AMD GPU - #4305

Merged
masahi merged 1 commit into
apache:masterfrom
petrex:rocm_device
Nov 16, 2019
Merged

[RUNTIME] Proper Device Attribute Query for AMD GPU#4305
masahi merged 1 commit into
apache:masterfrom
petrex:rocm_device

Conversation

@petrex

@petrexpetrex commented Nov 11, 2019

Copy link
Copy Markdown
Contributor

The PR implements proper device queries through hip runtime API.

One primary motivation is to support devices across different architectures. Note that we had some hardcoded value before (for example, max thread per block/ warp size), which may not be optimal for the new architecture.

One minor change: replace hipGetDeviceProperties() with hipDeviceGetAttribute() for better perf.

@masahimasahi self-assigned this Nov 12, 2019
@petrex

Copy link
Copy Markdown
ContributorAuthor

The error doesn't seem relevant to me, let me kick off the CI again.

___________________________ test_forward_placeholder ___________________________
def test_forward_placeholder():
'''test a simple pb with Placeholder node in the end of GraphDef'''
with tf.Graph().as_default():
> graph_def = tf_testing.get_workload("Custom/placeholder.pb")
tests/python/frontend/tensorflow/test_forward.py:1879: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ python/tvm/relay/testing/tf.py:209: in get_workload
path_model = download_testdata(model_url, model_path, module='tf')
python/tvm/contrib/download.py:158: in download_testdata
download(url, abspath, overwrite=False, size_compare=True)
python/tvm/contrib/download.py:63: in download
res_get = urllib2.urlopen(url)
/usr/lib/python3.6/urllib/request.py:223: in urlopen
return opener.open(url, data, timeout)
/usr/lib/python3.6/urllib/request.py:532: in open
response = meth(req, response)
/usr/lib/python3.6/urllib/request.py:642: in http_response
'http', request, response, code, msg, hdrs)
/usr/lib/python3.6/urllib/request.py:570: in error
return self._call_chain(*args)
/usr/lib/python3.6/urllib/request.py:504: in _call_chain
result = func(*args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib.request.HTTPDefaultErrorHandler object at 0x7f8c54531f98>
req = <urllib.request.Request object at 0x7f8c9c49a748>
fp = <http.client.HTTPResponse object at 0x7f8c9c2e5278>, code = 503
msg = 'Service Unavailable'
hdrs = <http.client.HTTPMessage object at 0x7f8c801b3080>
def http_error_default(self, req, fp, code, msg, hdrs):
> raise HTTPError(req.full_url, code, msg, hdrs, fp)
E urllib.error.HTTPError: HTTP Error 503: Service Unavailable
/usr/lib/python3.6/urllib/request.py:650: HTTPError

Comment threadsrc/runtime/rocm/rocm_device_api.cc
@petrex

Copy link
Copy Markdown
ContributorAuthor

See wiki. One architecture with different compute capabilities.

@petrexpetrex changed the title Proper Device Attribute Query for AMD GPU[RUNTIME] Proper Device Attribute Query for AMD GPUNov 14, 2019
@masahi

Copy link
Copy Markdown
Member

@petrex sorry I merged #4341 first and there is a conflict. Can you rebase?

@petrex
petrexforce-pushed the rocm_device branch 3 times, most recently from 18df399 to 60064ecCompareNovember 15, 2019 22:11
@masahi

Copy link
Copy Markdown
Member

@petrex can you check indentation issues? I see some weird indentation done by clang-format. It should be consistent with the rest of the code base.

@petrex

Copy link
Copy Markdown
ContributorAuthor

Morning @masahi. That weird clang-format behavior was due to a missing { from a manual merging. I've pushed the fix (passing linter and build, now with unit tests). Let's wait for the signal from CI. thanks

@masahi
masahi merged commit 022b285 into apache:masterNov 16, 2019
zxy844288792 pushed a commit to zxy844288792/tvm that referenced this pull request Nov 26, 2019
yongwww pushed a commit to neo-ai/tvm that referenced this pull request Nov 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@petrex@masahi@t-vi