{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/5464","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5464/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5464/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5464/events","html_url":"https://github.com/mne-tools/mne-python/pull/5464","id":352774347,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMDAyMjYw","number":5464,"title":"MRG: Speed up RF fitting with CuPy","user":{"login":"larsoner","id":2365790,"node_id":"MDQ6VXNlcjIzNjU3OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mne-tools/mne-python/milestones/14","html_url":"https://github.com/mne-tools/mne-python/milestone/14","labels_url":"https://api.github.com/repos/mne-tools/mne-python/milestones/14/labels","id":3712167,"node_id":"MDk6TWlsZXN0b25lMzcxMjE2Nw==","number":14,"title":"0.18","description":"","creator":{"login":"larsoner","id":2365790,"node_id":"MDQ6VXNlcjIzNjU3OTA=","avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":7,"state":"open","created_at":"2018-10-04T11:34:36Z","updated_at":"2018-12-01T10:04:46Z","due_on":"2019-05-01T07:00:00Z","closed_at":null},"comments":22,"created_at":"2018-08-22T02:07:36Z","updated_at":"2018-12-10T14:23:08Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/5464","html_url":"https://github.com/mne-tools/mne-python/pull/5464","diff_url":"https://github.com/mne-tools/mne-python/pull/5464.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/5464.patch"},"body":"Depends on #5452.\r\n\r\nI can get some reasonable gains:\r\n```\r\nRunning  2 in, -150 - 250 ms; 1.0 min epochs; 10000.0 Hz; 60 epochs\r\n  n_out= 2 n_jobs=   1: 0.81 min\r\n  n_out= 2 n_jobs=cuda: 0.69 min\r\n  n_out=60 n_jobs=   1: 4.28 min\r\n  n_out=60 n_jobs=cuda: 1.33 min\r\n```\r\nUsing [this gist](https://gist.github.com/larsoner/c58127bc466e8e8b7ce38af9f6ab825f).\r\n\r\n~~The remaining time seems to be consumed mostly by the special treatment that we need to give edge samples. One way to fix it is to add an arg `edge_treatment='correct' | 'trim'` that will just trim the invalid values of the FFT-based cross-correlation instead of correcting them. Basically this would mean if you pass 1.4 sec of data and estimate a -0.2 to 0.2 TRF, it will only use 1 sec of the data to do this. Essentially a wider crop / epoching of your signal can allow you to (potentially) greatly speed up RF fitting. Still need to ensure that's actually the case, though.~~"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/445832163","html_url":"https://github.com/mne-tools/mne-python/pull/5464#issuecomment-445832163","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5464","id":445832163,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTgzMjE2Mw==","user":{"login":"jona-sassenhagen","id":4321826,"node_id":"MDQ6VXNlcjQzMjE4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4321826?v=4","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T14:23:08Z","updated_at":"2018-12-10T14:23:08Z","author_association":"CONTRIBUTOR","body":"Here is your gist:\r\n\r\n```\r\nRunning  2 in, -150 - 250 ms; 1.0 min epochs; 10000.0 Hz; 60 epochs\r\n[............................................................] 100.00% Fit 60 epochs, 2 channels |   \r\n0.80 min\r\n  n_out= 2 n_jobs=cuda: Using CUDA for correlation calculations\r\n[............................................................] 100.00% Fit 60 epochs, 2 channels |   \r\n0.55 min\r\n[............................................................] 100.00% Fit 60 epochs, 2 channels |   \r\n8.97 min\r\n  n_out=60 n_jobs=cuda: Using CUDA for correlation calculations\r\n[............................................................] 100.00% Fit 60 epochs, 2 channels |   \r\n1.96 min\r\n```\r\n\r\nIt's not perfectly reliable, the computer was not perfectly idle in the time ..."}}
{"actor":{"display_login":"jona-sassenhagen"}}