Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 16, 2019

Conversation

petrex
Copy link
Contributor

@petrex petrex commented Nov 11, 2019

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.

@masahi masahi self-assigned this Nov 12, 2019
@petrex
Copy link
Contributor Author

petrex commented Nov 12, 2019

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

@petrex
Copy link
Contributor Author

petrex commented Nov 14, 2019

See wiki. One architecture with different compute capabilities.

@petrex petrex changed the title Proper Device Attribute Query for AMD GPU [RUNTIME] Proper Device Attribute Query for AMD GPU Nov 14, 2019
@masahi
Copy link
Member

masahi commented Nov 15, 2019

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

@petrex petrex force-pushed the rocm_device branch 3 times, most recently from 18df399 to 60064ec Compare November 15, 2019 22:11
@masahi
Copy link
Member

masahi commented Nov 15, 2019

@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
Contributor Author

petrex commented Nov 16, 2019

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:master Nov 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 free to 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