« first day (1625 days earlier)      last day (1607 days later) » 

12:18 AM
@Sam well, clearly you need to give me considerably more amounts of informations
 
 
9 hours later…
8:55 AM
@Sam Whatever it is, use MAGMA
 
 
1 hour later…
10:07 AM
Can I ask someone to render a plot for me? I have the overlapping number-with-axis problem again:
See the x-axis; I had a similar problem a while ago, and couldn't solve it either iirc
I want the numbers on top, if possible
 
10:21 AM
By now I reached this point, but seems to be unable to find the parameter which controls where the xticks appear.
for ii = 1:numel(h2.Parent.XTickLabel)
   h2.Parent.XTickLabel{ii} = [h2.Parent.XTickLabel{ii} '\n'];
end
This didn't help either, nor did stuff like adding \\ , or even with a LaTeX interpreter
 
@Adriaan did you try adding a _{ } or perhaps _{_{ }} to xticks?
 
@Dev-iL to where?
Oh, I see where
This also is a problem on the 'normal' x-axis though, so there's something up with my instalation
Utterly weird hack, but it works!
Eskerrikasko!
 
;)
 
figure;
hold on
grid on
h2 = plot(CT(:,2),CT(:,1)./1e3,'r-');
h1 = plot(Gea(:,2),Gea(:,1)./1e3,'b-');
h1.Parent.YDir = 'reverse';
h1.Parent.XScale = 'log';
h1.Parent.XMinorGrid = 'off';
h1.Parent.XAxisLocation = 'top';
h2.Parent.TickLabelInterpreter = 'tex';
for ii = 1:numel(h2.Parent.XTickLabel)
   h2.Parent.XTickLabel{ii} = [h2.Parent.XTickLabel{ii} ' _{_{ }}'];
end

legend('Civet et Tarits', 'Grayver et al.')
ylabel('Depth [km]')
xlabel('Electrical conductivity [S/m]')
Fun way of plotting stuff
 
Old MATLAB version (that doesn't support strings)?
@Adriaan Did you expect anything else from me? :P
 
10:37 AM
Fair point
@Dev-iL you're going to election, again, I see?
 
10:50 AM
@Dev-iL depends. That is useful for standard stuff, but if you want to do your own algorithms, its not.
 
@AnderBiguri you haz secret hat! Where in Glorious USSR you obtain such HAT?
 
Don't get me wrong, if you want to do what it is designed to do, the its the best tool there is
 
Sam
@AnderBiguri thats the only details you get... how do i fix it
;)
 
@Adriaan By recruiting another comrade into our glorious point system
@Sam pls has codes no work how fast pls
urgent
:P
 
@AnderBiguri que?
 
10:53 AM
Upvoting new user
 
eew
I might not get that...:p
 
well, sometimes new users post genuine questions. Often they are not very advanced, but if I see a clear question with a decent attempt, even if its something easy, I tend to upvote
Even if user is a newbie
 
Fair
I'm not much into the HATZ business this year though; need to finish my first year research proposal, and going away from a PC from the 21st to the 3rd
 
Sam
@AnderBiguri hahaha
so I've got a matrix `m` of shape `(x, y`)..
and I'm performing the following functions and said `m`
 
@Adriaan ah I quited last year. I have been less active on the site recently to be fair.
 
Sam
10:57 AM
c1 = m[:5, :]
c2 = m[5:, :]
c1_reduce = tf.math.reduce_max(c1, axis=0)
c2_reduce = tf.math.reduce_max(c2, axis=0)
c = tf.stack((c1_reduce, c2_reduce))
c = tf.transpose(c, perm=[1, 0])
c = tf.reshape(c, [-1])
reduce_max is reducing the matrix along the 0 axis
 
so what does that reduction return? Single value, or a vector?
 
@AnderBiguri I just got my matlab gold, but been doing mainly flagging and closing, with answering the odd question whenever I am too bored to work
 
Sam
returns vectors
 
fair. Just not used to the axis stuff
so what is the problem with that code?
 
Sam
Just got into work so going to start profiling it now.. I just wanted to know if any of those operations were obvious offenders to u
 
11:07 AM
what are you doing later with it?
so, likely, a stack will make a copy and fill it twice with the output of the others. Likely, the transpose will make a copy and fill it with c (in python, transpose does not make a copy, but I am not sure if tf behaves the same. It would make CUDA sense to have it make a a copy)
so, the real question is: what are you doing with c after? Why do you need to do those 3 memory operations after the reduces?
As a last thing when you are going to profile, can you test on profiling the reduces on properly transposed data? transpose c1 and c2 with a deep copy (make sure it happens) and then try to reduce at a different axis
 
Sam
11:22 AM
All of that code I just sent you is wrapped in a function.. and theres an operation which happens prior which I think is the offender
I have a 3D tensor.. and I use tf.map_fn() which basically iterates over the first dimension of this tensor and sends a 2d matrix into that above code
Does that flow make sense?
 
11:34 AM
not in text no. Plus you will need to be more specific, not to me, but to yourself. Profile your code.
Pinpoint the location of the slowness by removing stuff until the effect is gone
it could be memory, it could be you are doing somethign wrong
descriptions of it wont be enough to help you unfortunately.
 
@Dev-iL MAGMA?
 
e.g. if the code above is the only thing you do in he GPU, it makes sense its slow due to the inherent overheard that is passing in and out your problem tot he GPU
 
Sam as no MCVE
 
CUDA is one of those languages where you need to take very long time to make a MCVE, as its hard to guess why something may go wrong and the entire code is generally super long
 
well anyway over at codereview.SE they ask for complete programs
 
11:40 AM
Very little CUDA experst there though. Plus, if you have code that is not fast in CUDA, can you consider it a code review, or are you fundamentally not doing what you should, as its purpose is being fast?
 
Sam
@AndrasDeak I can make an MCVE in NumPy but can't in tensorflow :) Happy to do so though
 
well I can't help either way
 
@Sam yes, you should, for you at least. You need to know what makes it slow and we cant help unless we have your data and code
 
Sam
@AnderBiguri sure. Will chuck something together now :D
 
just make sure the "something" reproduces your speed problem etc.
 
11:48 AM
yeah. Sorry, its not that I dotn want to help, simply its super duper hard to guess why something in CUDA is slow by looking at ti
 
Sam
12:04 PM
I've made a working example using NumPy as well as comments to what I do and where the issue lies. repl.it/repls/BrightShortAddresses
The upshot is.. I basically need to refactor the operations inside of p to accept a 3d tensor and a list of indices as opposed to a 2d matrix and a single integer value
 
Are you sure that is the problem? Iterating through slices of tt should not have a serious performance drop
I am assumign that in your tensorflow case, all these are memory i the GPU right?
 
 
1 hour later…
1:20 PM
I've been thinking.. There's no reason for a list of figures/tables to contain complete captions, right?
Moreover, I'm thinking that what would make that list more useful is if I give more descriptive names in the LOF (i.e. different strings entirely, where appropriate).
 
What do you mean by "list of figures/tables"?
 
1:41 PM
In e.g. a thesis
 
But as in "figures can be found at the end in a list", or "figures are also listed at the end"?
 
also; and at the beginning
 
Yeah, I'd imagine that in the thesis you have figures/tables with full captions, and in the front/end list of material you only describe what the figure/table is about (but not things like "dotted lines denote ..." and the like)
 
1:56 PM
I agree. However, I think that in the list there is room to replace some abbreviations or "highly local" terms with more general wordings
This may be frowned upon, but I'll give it a try
 
full disclosure: I've never written or seen such lists, so this is just my own taste
 
 
2 hours later…
4:18 PM
Hah, I just found a user profile stating:
> Geophysics master student in (...), trying to learn more about shell, MatLab and Python
Shell gets an interesting double meaning in the field of geophysics :P
 
Sam
@AnderBiguri yup it is
 
@Adriaan heh
@Sam any chance your real tt went through some transposes and isn't contiguous in memory?
 
Sam
5:06 PM
@AndrasDeak I'm now taking out chunks of the tensorflow model and trying to run that through a Cuda profiler
So maybe I'll get some better exposure
 
OK, profiling usually helps
 
Sam
Will let you know how i get on tomorrow :)
 
please do
 
5:21 PM
@Dev-iL in my thesis it is like that, and its common enough that latex captions are like that too. You can write the short and long versions of the figure description
And the short one uniquely appears on the LOF
 
 
6 hours later…
11:29 PM
I was just awarded the announcer badge twice, for the same two links I had received it before. Weird bug. stackoverflow.com/help/badges/260/announcer?userid=7328782
 
well the link is different...
two are the questions, two the answers
 
But I probably only linked to the answers.
 
11:58 PM
wow, I just got a truckload of badges too
what the heck
 

« first day (1625 days earlier)      last day (1607 days later) »