why not use gomobie native for ios/android

gomobile can be build ios/android and mac/linux directly with one code base .
Why you use gomobile bind instead of gomobile native

since your target include gomobile
why not use common gomobile lib.
replace go-gl
github.com/go-gl/gl/v2.1/gl                   --> golang.org/x/mobile/gl
glfw  -->      golang.org/x/mobile/app (support both mobile and pc)
github.com/timshannon/go-openal/openal        --> golang.org/x/mobile/exp/audio/al

I'm not sure what you mean by 'gomobile native'.
BTW, I had a problem in such imports (https://github.com/golang/go/issues/17945) and I couldn't find any solutions.

github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl

mobile/gl must work with Shinny, which I don't use.

glfw --> golang.org/x/mobile/app (support both mobile and pc)

Windows supports is not completed yet. Also, I don't think golang.org/x/mobile/app will support gamepads or keyboards

github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/al

https://github.com/golang/go/issues/15075

gomobile native
https://github.com/golang/go/wiki/Mobile#native-applications
means you don't need java or obj-c code , only go code .
I notice you used gomobile bind which need java and objc code.
<https://github.com/golang/go/issues/17945>) and I couldn't find any
solutions.
with gomobile native you don't need to bind

~~~~mobile/gl must work with Shinny, which I don't use.
I don't know this shinny  , u mention in another thread
https://github.com/hajimehoshi/ebiten/issues/162
As I know  gles function can both work on pc/mobile.   it is better use
gles function instead of gl if you want to support mobile .

~~~~~Windows supports is not completed yet. Also, I don't think
golang.org/x/mobile/app will support gamepads or keyboards
have you notice that few and few people play game on pc now. mobile is the
future.
I did not test on windows,   but keyboard seems ok on mac. I guess it will
add windows support at some point.

~~~~~golang/go#15075 <https://github.com/golang/go/issues/15075>
as I mentioned mobile is the future.  this small bug on macos would not
block the way , it will be fixed sooner or later.

2017-04-09 22:53 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
> I'm not sure what you mean by 'gomobile native'.
>
> BTW, I had a problem in such imports (golang/go#17945
> <https://github.com/golang/go/issues/17945>) and I couldn't find any
> solutions.
>
> github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl
>
> mobile/gl must work with Shinny, which I don't use.
>
> glfw --> golang.org/x/mobile/app (support both mobile and pc)
>
> Windows supports is not completed yet. Also, I don't think
> golang.org/x/mobile/app will support gamepads or keyboards
>
> github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/
> al
>
> golang/go#15075 <https://github.com/golang/go/issues/15075>
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-292790705>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AH9v9NMEGby2M0hDEnqRRlzbSEk9uEJHks5ruPDqgaJpZM4M4BzT>
> .
>

according to my research
github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl
glfw --> golang.org/x/mobile/app
github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/al
these 3 step is workable.
At least on mac android ios.  with gomobile native
2017-04-09 23:54 GMT+08:00 hui zhang<EMAIL_ADDRESS>
gomobile native   https://github.com/golang/go/wiki/Mobile#native-
applications
means you don't need java or obj-c code , only go code .
I notice you used gomobile bind which need java and objc code.
<https://github.com/golang/go/issues/17945>) and I couldn't find any
solutions.
with gomobile native you don't need to bind

~~~~mobile/gl must work with Shinny, which I don't use.
I don't know this shinny  , u mention in another thread
https://github.com/hajimehoshi/ebiten/issues/162
As I know  gles function can both work on pc/mobile.   it is better use
gles function instead of gl if you want to support mobile .

~~~~~Windows supports is not completed yet. Also, I don't think
golang.org/x/mobile/app will support gamepads or keyboards
have you notice that few and few people play game on pc now. mobile is the
future.
I did not test on windows,   but keyboard seems ok on mac. I guess it will
add windows support at some point.

~~~~~golang/go#15075 <https://github.com/golang/go/issues/15075>
as I mentioned mobile is the future.  this small bug on macos would not
block the way , it will be fixed sooner or later.

2017-04-09 22:53 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
> I'm not sure what you mean by 'gomobile native'.
>
> BTW, I had a problem in such imports (golang/go#17945
> <https://github.com/golang/go/issues/17945>) and I couldn't find any
> solutions.
>
> github.com/go-gl/gl/v2.1/gl --> golang.org/x/mobile/gl
>
> mobile/gl must work with Shinny, which I don't use.
>
> glfw --> golang.org/x/mobile/app (support both mobile and pc)
>
> Windows supports is not completed yet. Also, I don't think
> golang.org/x/mobile/app will support gamepads or keyboards
>
> github.com/timshannon/go-openal/openal --> golang.org/x/mobile/exp/audio/
> al
>
> golang/go#15075 <https://github.com/golang/go/issues/15075>
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-292790705>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AH9v9NMEGby2M0hDEnqRRlzbSEk9uEJHks5ruPDqgaJpZM4M4BzT>
> .
>

Here is the reason why I didn't adopt gomobile build https://github.com/hajimehoshi/ebiten/wiki/Mobile

I did not test on windows,   but keyboard seems ok on mac. I guess it will add windows support at some point.

Why do you think so?

as I mentioned mobile is the future.  this small bug on macos would not block the way , it will be fixed sooner or later.

OK, let me know when this is fixed.

check this https://pt.slideshare.net/takuyaueda967/go-for-mobile-games
how to publish on play store
2017-04-10 0:26 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Here is the reason why I didn't adopt gomobile build https://github.com/
hajimehoshi/ebiten/wiki/Mobile
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-292796076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9O8pGU5kqqAy0gMF4jSZG_STsP-Eks5ruQa8gaJpZM4M4BzT
.

another question is  how you support ios/android with go-gl glfw?
2017-04-10 9:05 GMT+08:00 hui zhang<EMAIL_ADDRESS>
check this https://pt.slideshare.net/takuyaueda967/go-for-mobile-games
how to publish on play store
2017-04-10 0:26 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Here is the reason why I didn't adopt gomobile build
https://github.com/hajimehoshi/ebiten/wiki/Mobile
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-292796076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9O8pGU5kqqAy0gMF4jSZG_STsP-Eks5ruQa8gaJpZM4M4BzT
.

check this https://pt.slideshare.net/takuyaueda967/go-for-mobile-games
how to publish on play store

I've read that and concluded that gomobile build is still not feasible.

another question is  how you support ios/android with go-gl glfw?

For mobiles, Ebiten uses golang.org/x/mobile/... instead of GLFW.

thanks for your reply.
It seems Ebiten is the best 2d go game library right now .
Does Ebiten has some plan to support some ui editor ?  ui tool is essential
for game development.
2017-04-10 15:30 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
check this https://pt.slideshare.net/takuyaueda967/go-for-mobile-games
how to publish on play store
I've read that and concluded that gomobile build is still not feasible.
another question is how you support ios/android with go-gl glfw?
For mobiles, Ebiten uses golang.org/x/mobile/... instead of GLFW.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-292870900,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9B-Vb-M1pdDthe5QNxcvVUVeeEXZks5rudp_gaJpZM4M4BzT
.

Thank you for saying that.

Does Ebiten has some plan to support some ui editor ?  ui tool is essential for game development.

No so far. I'd like to but I don't have enough resource for that. This will be another project from Ebiten since I want to keep Ebiten simple.

Let me close this. Feel free to ask me when you find another problem.

Thank u  ,   I would like to ask another question .
since go build support multi arch os
Can I use go or gomobile to build c library for ios and android system ?
I found the go game engine is not mature.
I guess maybe I could write logic with go .
But engine use mature engine like cocos2dx which has a good support for
c/c++
2017-04-12 10:12 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Let me close this. Feel free to ask me when you find another problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-293452364,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9NsOGfbGfTmmuIcx-jUjGwFWmrxqks5rvDMWgaJpZM4M4BzT
.

I think it's technically possible by creating native binaries and creating aar/framework by yourself, I don't think it's feasible though. I'm not familiar with Cocos2dx and this might be a wrong answer.

here list the support system , in theory it can do ,  but I meet tech issue
that I don't know be solved.
https://groups.google.com/forum/#!topic/golang-nuts/LDK6T_3Mc4o
go tool dist list

android/386
android/amd64
android/arm
android/arm64
darwin/386
darwin/amd64
darwin/arm
darwin/arm64
linux/386
linux/amd64
linux/arm
linux/arm64

2017-04-12 10:29 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
I think it's technically possible by creating native binaries and creating
aar/framework by yourself, I don't think it's feasible though. I'm not
familiar with Cocos2dx and this might be a wrong answer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-293454543,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9H1R3sOkLc1hswqJf1ut15EaJ9lhks5rvDb0gaJpZM4M4BzT
.

I'm afraid I have no idea about your case.

Hi Hajime
long time no contact
I am still hesitating which engine to choose to build a mobile game.
Both ebiten and gomobile can do.
gomobile seems more official.
Is windows support the main concern for you to build ebiten ?
Or any other reason?
I am not familiar with gomobile bind.
Can gomobile bind use on gomobile build project ?
For official example flappy,  can it be use for gomobile bind?
I am trying to use gomobile build first,  if meet anything can not be done,
I want it switch to gomobile bind.
2017-04-12 10:59 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
I'm afraid I have no idea about your case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-293458599,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9A6C61lt6k63DeSF85908ta5BqPPks5rvD4BgaJpZM4M4BzT
.

Is windows support the main concern for you to build ebiten ?
Or any other reason?

I don't understand your question.

I am not familiar with gomobile bind.
Can gomobile bind use on gomobile build project ?
For official example flappy,  can it be use for gomobile bind?

No: to use gomobile bind on the go flappy game, you'd need some fix on it, but I'm not sure how much fix you'd need.

Is Microsoft windows system support the main concern for you to build
ebiten ?
For I see in gomobile app , it use glfw for pc too. and you use part of
gomobile,  so you don't have to build another engine.
gomobile provides enough functions, and go build can run both ios and
android,   and can be pulibshed on app store/google play.
I have a game in pc,  I want to port it to mobile .
the old game logic looks like
init() {glfw.init, gl.init}
for {
updateInput()
updateDraw()
}
however most engine  like gomobile  use a event driven loop
for e := range a.Events() {
switch e := a.Filter(e).(type) {
case lifecycle.Event:
switch e.Crosses(lifecycle.StageVisible) {
case lifecycle.CrossOn:
gl.Glctx, _ = e.DrawContext.(mgl.Context)
//onStart(glctx)
a.Send(paint.Event{})
case lifecycle.CrossOff:
//onStop(glctx)
//glctx = nil
}
case size.Event:
//sz = e
//touchX = float32(sz.WidthPx / 2)
//touchY = float32(sz.HeightPx / 2)
case paint.Event:
if gl.Glctx == nil || e.External {
// As we are actively painting as fast as
// we can (usually 60 FPS), skip any paint
// events sent by the system.
continue
}
  //onPaint(glctx, sz)
  main_paint()
  a.Publish()
  // Drive the animation by preparing to paint the next frame
  // after this one is shown.
  a.Send(paint.Event{})

case touch.Event:
//touchX = e.X
//touchY = e.Y
}
}
I have no idea how to do the change .
What ebiten use ?
the event driven  mode ?
or the straight forward mode.
2017-05-05 13:59 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Is windows support the main concern for you to build ebiten ?
Or any other reason?
I don't understand your question.
I am not familiar with gomobile bind.
Can gomobile bind use on gomobile build project ?
For official example flappy, can it be use for gomobile bind?
No: to use gomobile bind on the go flappy game, you'd need some fix on it,
but I'm not sure how much fix you'd need.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-299388629,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9CpxW-cl42cK7vnie-QTdcC-Vnksks5r2rrQgaJpZM4M4BzT
.

Is Microsoft windows system support the main concern for you to build ebiten ?

What do you mean by 'concern'?
Ebiten doesn't use or support gomobile's event loop.

Hi Hajimenhoshi
sorry to border you again.
I am using gomobile build to build an android game.
Right now I meet serious performance issue on android (ios seem to have the
same issue)
First I thought it was my code problem.
But after I test the official example flappy on my device , it also the
same.
The fps is not stable, the flappy game some times drop to 10 fps after run
1minute.
I guess it is the engine problem.   I am using golang.org/x/mobile/app  and
golang.org/x/mobile/gl
Are your engine use  golang.org/x/mobile/gl for mobile too?
Have u met the same problem in your engine?
Another problem is when I press home button on andoird/ios and switch to
desktop, and then switch back. the game turns black.
How do you solve that on your engine.
Thanks
Hui
2017-05-08 10:52 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Is Microsoft windows system support the main concern for you to build
ebiten ?
What do you mean by 'concern'?
Ebiten doesn't use or support gomobile's event loop.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-299760873,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9MlTTyPHfpu5vKINbztGdwHqhAAqks5r3oN3gaJpZM4M4BzT
.

Performance can depend on your device. What kind of Android device are you using?

Another problem is when I press home button on andoird/ios and switch to
desktop, and then switch back. the game turns black.
How do you solve that on your engine.

OpenGL ES can cause 'context lost' easily. When this happens, all resources on GPU memory like textures or renderer buffers are cleared and you need to recreate them. Ebiten automatically recreates all lost resources. See internal/restorable package.

thank you very much .
I regret I did not use your engine at the first time.
There is bunch of holes in gomobile build. and it  stop developing.
I will try to migrate my game to your engine later.
2017-05-25 18:51 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Performance can depend on your device. What kind of Android device are you
using?
Another problem is when I press home button on andoird/ios and switch to
desktop, and then switch back. the game turns black.
How do you solve that on your engine.
OpenGL ES can cause 'context lost' easily. When this happens, all
resources on GPU memory like textures or renderer buffers are cleared and
you need to recreate them. Ebiten automatically recreates all lost
resources. See internal/restorable package.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-303981905,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9GybkvW30q9zN9dQEAj8f1vpo5XHks5r9V0egaJpZM4M4BzT
.

Thanks. Note that my lib doesn't accept gomobile build and you would need to use gomobile bind. This means that you would need to write some Java/Objective-C code. https://github.com/hajimehoshi/ebiten/wiki/Mobile might be helpful.

In the wiki and demo,  it seems I should only do copy and paste things,
right?
I don't need to write much objc and java code.
2017-05-26 9:02 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Thanks. Note that my lib doesn't accept gomobile build and you would need
to use gomobile bind. This means that you would need to write some
Java/Objective-C code. https://github.com/hajimehoshi/ebiten/wiki/Mobile
might be helpful.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-304163584,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9JoJ7z6gDB5z9g0te-ftoO_lN9Toks5r9iSWgaJpZM4M4BzT
.

Basically yes, but besides the Wiki page, you'd need some code or storyboard or something to construct UI.

Is this " code or storyboard or something"  can be found in your
inovation2007 demo?
I am confused ,  since we use opengl to do all the drawing. other things
like portrait/landscape are in xcode or android manifest setting .     What
else should we be concerned ?
could u tell me more about this  " code or storyboard or something"   ?
2017-05-26 9:26 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Basically yes, but besides the Wiki page, you'd need some code or
storyboard or something to construct UI.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-304166760,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9NOA1vFGPaCDFGwl7-Xi0-L1ycOTks5r9ipOgaJpZM4M4BzT
.

For iOS, I recommend to open the Xcode project in https://github.com/hajimehoshi/go-inovation/tree/master/mobile/ios and see what is going on. Storyboard is used to define an OpenGL surface.

OpenGL ES can cause 'context lost' easily. When this happens, all
resources on GPU memory like textures or renderer buffers are cleared and
you need to recreate them. Ebiten automatically recreates all lost
resources. See internal/restorable package.

why don't you use something like setPreserveEGLContextOnPause to restore
context automatically
https://stackoverflow.com/questions/11067881/android-when-is-opengl-context-destroyed
2017-05-25 18:51 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Performance can depend on your device. What kind of Android device are you
using?
Another problem is when I press home button on andoird/ios and switch to
desktop, and then switch back. the game turns black.
How do you solve that on your engine.
OpenGL ES can cause 'context lost' easily. When this happens, all
resources on GPU memory like textures or renderer buffers are cleared and
you need to recreate them. Ebiten automatically recreates all lost
resources. See internal/restorable package.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-303981905,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9GybkvW30q9zN9dQEAj8f1vpo5XHks5r9V0egaJpZM4M4BzT
.

Thanks, I just didn't know that.
Though some old Android devices don't support it, this seems useful. It looks like iOS context is automatically preserved.
I couldn't find a similar API for WebGL,

for native activity in android
use this solution.
https://stackoverflow.com/questions/10173013/reinitialize-opengl-es-2-window-on-nativeactivity-resume
However,  I still don't know where the set the eglCreateWindowSurface
function,
Do you have any idea on android native activity?
2017-05-27 13:58 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
Thanks, I just didn't know that.
Though some old Android devices don't support it, this seems useful. It
looks like iOS context is automatically preserved.
I couldn't find a similar API for WebGL,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-304430469,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9FKS9PEVWYT3ntT0L4Uv0b7y8bN4ks5r97uhgaJpZM4M4BzT
.

I'll adopt after I confirm that there is a way to keep opengl context on all platforms including WebGL.

eglCreateWindowSurface

I have no idea. I'm not sure what you are trying to solve.

what is your personal email address ?   I can only see your github email
address,  so I can only send through this thread
maybe we can discuss about the go game engine .
There are few doc and few people working on this area.
gomobile build can integrate (ios framework /android jar)  IAP or AD
component. (see below link how to)
And I have use gomobile build on mac ios and android well,
I did not encounter your problem mentioned above
maybe you can consider to move to gomobile build.
for  android
https://docs.google.com/presentation/d/1PvlfcO5OU0Zlv3eISdIgUsRLpXsVaMvxX0C0c7iCvHg/edit#slide=id.g1530211a36_0_351
for ios   just need keep the temp project file , this also solve the code
sign problem for distribution
--- a/cmd/gomobile/init.go
+++ b/cmd/gomobile/init.go
@@ -441,7 +441,7 @@ func removeAll(path string) error {
            resetReadOnlyFlagAll(path)

    }

  return os.RemoveAll(path)

  return nil//os.RemoveAll(path)

}
2017-05-27 14:39 GMT+08:00 Hajime Hoshi<EMAIL_ADDRESS>
I'll adopt after I confirm that there is a way to keep opengl context on
all platforms including WebGL.
eglCreateWindowSurface
I have no idea. I'm not sure what you are trying to solve.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/hajimehoshi/ebiten/issues/340#issuecomment-304432372,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9v9IfFYvFbZmNxFgBoMwdbKp0zgdzPks5r98UigaJpZM4M4BzT
.

<EMAIL_ADDRESS>I thought this was shown on my GitHub profile page. That's strange.
Or, Gopher Slack's #ebiten channel is also available :-)
I've read that slide and thought that way was quite hard for regular Go users.


i18n(es): update markdown-content.md

What kind of changes does this PR include?

New or updated content
Translated content

Description
Update markdown-content.md with latest changes.

Thanks for the updates in 2aa4c1a (#1941) @fredoist! I’ll wait before merging this in case a reviewer wants to correct anything there.

LGTM!

Gracias @fredoist y @agustinmulet 🥰


Standardized source values

Currently, a user could use the mobile app API key and tamper with their auth/register request to set a nonsense source value. We should consider standardizing this as an enum value with a set of pre-defined "acceptable sources" somewhere.
:runner: Stretch goal: It could also be interesting to look into having the source inferred from the API key for the request (e.g. if a request is made with the LetsDoThis API key, set that in the "source" field automatically).

 As a dev, I want to standardize source value and have the source inferred from the API key for each request so that users can't tamper with the auth/register request.


correct logrotate postrotate command for upstart init_style

If init_style is set explicitly to 'upstart' the /etc/init.d/chef-client script will not exist, use initctl instead

I think this is covered by the "obvious fix" clause, but let me know if you need me to sign a CLA.

:+1:


feat(api): UploadBinaryFile support uploads binary file

We usually need to upload system generated virtual files that contains dynamic data.

Looks good.
Would you mind showing me the document from lark platform? I want to the usage. Thanks.

Actually UploadBinaryFile share same API with UploadFile.
https://open.feishu.cn/document/server-docs/im-v1/file/create
The differentiation when UploadFile lookup a file based on path provided in the argument then load the content, UploadBinaryFile retrieve file content via io.Reader directly.

Actually UploadBinaryFile share same API with UploadFile. https://open.feishu.cn/document/server-docs/im-v1/file/create
The differentiation when UploadFile lookup a file based on path provided in the argument then load the content, UploadBinaryFile retrieve file content via io.Reader directly.

I think it not necessary to create a new method. Maybe just add a parameter in the request?

I was thinking about that too, but i follow what UploadImage & UploadImageObject do.
They also share same API but have different input.
What do you think, wasn't this PR follow the project approach to have isolated and clear method ?
But if change to one method with additional parameter, i have a question.
How we decide between path / binary ?

Make the reader pointer, check the reader, use path when the reader nil or
Check the path, use binary when the path empty ?
But, what happen if both empty ?
Return error from our package side ?

I was thinking about that too, but i follow what UploadImage & UploadImageObject do. They also share same API but have different input. What do you think, wasn't this PR follow the project approach to have isolated and clear method ?
If change to one method with additional parameter, i have a question. How we decide between path / binary ?
1. Make the reader pointer, check the reader, use path when the reader nil or

2. Check the path, use binary when the path empty ?

But, what happen if both empty ?
1. Return error from our package side ?

The UploadImageObject is an old-school method, which was not reviewed carefully and then migrated from in-house repo to GitHub. We may also remove UploadImageObject then.
Maybe change both into pointers and check which is not nil.

Hi @crispgm please check another PR related to changes here: https://github.com/go-lark/lark/pull/72


(Tagged) Hashing and Signing by Oracle of Message

As @LLFourn mentions here, we need to specify a signing algorithm which includes a tagged hash for oracles signing messages.
We also need to decide what goes into this signed message other than just the outcome (e.g. the event id as well?)

Concept ACK!!
Imo we should be using tagged hashes for the outcome and the announcement.
Ideally we should have a version number in the tag as well as maybe use a different tag for different event types (ie DLCv0Announcement, DLCv0EnumOutcome, DLCv0DigitDecomp, etc)

We also need to decide what goes into this signed message other than just the outcome (e.g. the event id as well?)

If the goal of this is to not have the same pre-images for differing events, then maybe just adding in the nonce (or hash of) would be the easiest.

Oops I seem to have missed these comments before looking at the PR. It's probably better to continue here.

If the goal of this is to not have the same pre-images for differing events, then maybe just adding in the nonce (or hash of) would be the easiest.

Ah this addresses my query on the PR. The goal of including the event_id in there is so you can use the signature without having the announcement and learn a fact about the past. e.g. US_election_2020_Trump_v_Biden=Biden_win. If you just have Biden_win  you don't know just from the signature and message whether Biden won the presidential race or Friday night Bingo. If you have US_election_2020_Trump_v_Biden=Trump_win then you already have everything you need to show fraud.

Ideally we should have a version number in the tag as well as maybe use a different tag for different event types (ie DLCv0Announcement, DLCv0EnumOutcome, DLCv0DigitDecomp, etc)

As I said in PR I think we shouldn't use tags this way. We should just have one tag for all oracle signatures and domain separate separate different kinds of oracle signatures in the message itself. Having different tags means to anticipate signatures I have to cache around tagged hashes for all these tags to be maximally efficient.
On the subject of tagged hashes -- Jonas has put together a PR making variable length messages possible: https://github.com/bitcoin-core/secp256k1/pull/844 which would remove the need for tagged hashes altogether. You can just prefix the message with a 64 byte tag which would make things much simpler.


Todo list App peer review

Hello ✋ CR,
This PR, shows to review my previous To Do List Project by coding partner
General requirements

No linters error
Used correct GitHub flow
Document the project readme in professional way

Project requirements

[ ]  Add and remove tasks
[ ]  Interactive features
[ ]  Check follow good JavaScript best practices
[ ]  Make sure the code base DRY, KISS, and YAGNI
[ ]  Do follow the good HTML & CSS best practices

I would like to say thank you for your constructive feedback


fix(designer): Un-revert panel changes & fix sizing to accommodate that change

Requirement Checklist

[x] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes or features)
[ ] Docs have been added or updated (for bug fixes or features)

Type of Change

[x] Bug fix
[ ] Feature
[ ] Other

Current Behavior
Reuse of height: 100% causes some issues w/ designer height and panel height. See also #5384.
New Behavior
Containers are now properly aligned using flex sizing attributes to prevent reuse of height: 100%.
I've verified this change works in:

Power Automate Portal (requires adding display: flex to .fl-V3DesignerPage-innerContainer in host code base)
LAUX standalone w/ top command bar
LAUX standalone w/ floating command bar

I am unable to test in Logic Apps Portal.
Impact of Change

[x] This is a breaking change.

Screenshots or Videos (if applicable)
Before

After

Going to review this with @rllyy97 tomorrow.

This will just be a breaking change for anyone using designer and expecting the height: 100% for proper rendering

This will just be a breaking change for anyone using designer and expecting the height: 100% for proper rendering

Yup, thanks for the callout. I marked this PR as breaking in the description.


Update documentation and configuration for Retired Analyzers

Fixes Issue #937
The documentation has been updated to indicate that the Node.js analyzer was retired. The NSP analyzer should be used going forward. Additionally, configuration options were added to re-enable the retired analyzers.

Can one of the admins verify this patch?


macOS Sierra. Test app don't actually vibrant

I can't create with different type of vibrant window on my macOS 10.12.1 and width electron 1.4.5.
What actually I have:

So It seems very weak vibrancy

That is a vibrant window.

Yes, it's my bad. I change Material to 9 and vibrancy making is more obvious)

Also play with the alpha value in the test app to see how it affects. The default is 0.4.

Also check out this by @oskarkrawczyk

I have another problem:
Window with focus:

Window without focus is solid grey:

@MaxGraey This is the default behavior on macOS – every app using vibrancy does this. Even OS' native apps.

@oskarkrawczyk I got it, thanks for response!

@oskarkrawczyk @MaxGraey I'm having the same problem than this (a solid grey background when window is not focused), could you please explain how to keep vibrant effect or point to relevant documentation?

Okay I just saw that vibrancy is now integrated into electron and that their implementation does not cause the grey background problem.
Never mind.


Check error handling on node normalizer calls

We still see sporadic errors from NN. Seems to be a networking issue, because NN doesn't show any errors or traces of every receiving the requests.


[roles-0.1.0] Build UI for Roles index page

Focus on Mobile first.
Mock out data initially, until smart contract interactions are hooked up.

This is complete


[Fundamentals] Correct notifications API Token permission

Update notifications account permission to correctly reflect read/write access.

TY, @dom-cf


Data bag details UI improvements changes with search box

:nut_and_bolt: Description: What code changed, and why?
Need to update the new UI for the data bags details page with the search bar.
UX design

:chains: Related Resources
https://github.com/chef/automate/issues/4620
https://github.com/chef/automate/issues/4670
:+1: Definition of Done
I have added new UI changes for the data bag details page using the search bar.
:athletic_shoe: How to Build and Test the Change
STEP 1
inside the hab studio

[default:/src:0]# build components/automate-ui-devproxy/
[default:/src:0]# start_automate_ui_background
[default:/src:0]# start_all_services

STEP 2
open new window
go to automate UI path

$ cd components/automate-ui
and run the command

npm run serve:hab

To add data https://github.com/chef/automate/blob/master/dev-docs/adding-data/adding_test_data.md#adding-data-to-infra-views
Go to Infrastructure tab >> Chef Servers it's under Chef-Server feature flag  >> click to any server >> see the list of org's >> click to any org >> on org details page you can see the multiple tabs >> click to data bags tabs >> you can see the list of data bags >> after click you can see the data bag details page.

:white_check_mark: Checklist

[ ] I have read the CONTRIBUTING document.
[ ] Tests added/updated?
[ ] Docs added/updated?
[ ] All commits have been signed-off for the Developer Certification of Origin.

:camera: Screenshots, if applicable

Thanks vinay,
The details are being fetched properly.
There are some issues i found:

The search button icon is not centered properly. There is also a bit of extra space to the right. Can you also take a look at the fonts and colors if they match the ux

Also there is some unexpected behaviour in the search action. If we do a search query and then delete the query from the input box the search result is not fetching all the data.

I have updated the changes.. can you please check.

While testing found list caption spacing changes and title active state CSS changes.

Created issue for the UI chages #4750 and raised PR with changes #4754 against issue.


Undefined Js::__set_state() after caching routes, when using JS::from()

Laravel Version
10.12.0
PHP Version
8.2.6
Description
The entire application breaks when caching routes that use Js::from().
Even php artisan route:clear cannot work due to the error. Manually deleting bootstrap/cache/routes-v7.php is the only way to restore functionality.
This is not specifically new to v10.12.0, as this also happened on v10.9.
Steps To Reproduce

Define a view route using a Js::from() parameter

use Illuminate\Support\Js;

Route::view('/thing', 'my.view', [
    'list' => Js::from([1, 2, 3])
]);

Cache the route

php artisan route:cache

The entire application will now be broken, due to the error in routes-v7.php

Here is the exact generated route code in routes-v7.php
  'generated::icUsDJ3anOXWYT1l' =>
  array (
    'methods' =>
    array (
      0 => 'GET',
      1 => 'HEAD',
    ),
    'uri' => 'thing',
    'action' =>
    array (
      'middleware' =>
      array (
        0 => 'web',
      ),
      'uses' => '\\Illuminate\\Routing\\ViewController@__invoke',
      'controller' => '\\Illuminate\\Routing\\ViewController',
      'namespace' => NULL,
      'prefix' => '',
      'where' =>
      array (
      ),
      'as' => 'generated::icUsDJ3anOXWYT1l',
    ),
    'fallback' => false,
    'defaults' =>
    array (
      'view' => 'my.view',
      'data' =>
      array (
        'list' =>
        // vvvvvv HERE IS THE ERROR vvvvvv
        \Illuminate\Support\Js::__set_state(array(
        // ^^^^^^ HERE IS THE ERROR ^^^^^^
           'js' => 'JSON.parse(\'[1,2,3]\')',
        )),
      ),
      'status' => 200,
      'headers' =>
      array (
      ),
    ),
    'wheres' =>
    array (
    ),
    'bindingFields' =>
    array (
    ),
    'lockSeconds' => NULL,
    'waitSeconds' => NULL,
    'withTrashed' => false,
  ),

I'd like to add that the reason I am filling this as a bug is because of the breaking consequences of such an action.
I am of course aware of workarounds, such as using a controller action instead, or even calling JS::from() from the view itself.
If using a Js instance in view arguments is unsupported, that's okay but the caching process should actually throw some kind of exception instead of letting the file being written to. (Maybe having a failsafe with a dummy eval() of the compiled array to detect any inconsistency and preventing the cached file to be written?)

Js::from should only be used in Blade templates.

Js::from should only be used in Blade templates.

@driesvints Alright makes sense, but what about the rest of the issue?

If using a Js instance in view arguments is unsupported, that's okay but the caching process should actually throw some kind of exception instead of letting the file being written to. (Maybe having a failsafe with a dummy eval() of the compiled array to detect any inconsistency and preventing the cached file to be written?)

I still don't think it is appropriate of Laravel of softlocking itself without warning if invalid data is present in the routes, requiring manual intervention on the filesystem.

Sorry but this is a bug in your code. If you feel Laravel should behave differently here, please attempt a PR.

It is not a bug in my code, I even provided repro steps from a fresh new project..?
To rephrase the issue shortly: Any attempt to use any object in a route parameter, and then proceeding to cache routes will make Laravel stop working, as var_export will generate invalid code (due to those objects missing __set_state() definition).
The expected outcome is that Laravel errors out before writing that invalid PHP code to the route cache, instead of completely breaking and being unable to recover itself after the fact.


Fix version hint lxml

dependabot has bumped the dependency lxml to version 4+ while we still hint in the script at the 3+ version.

The failing checks are pytest finding ... no tests - should we maybe start providing some :wink:?


Fixing index.html

Add back the login function and the enter event section.
The spacing problem will be fixed after all of you agree on the pull request.

is it using the new UI or placing original index.html ??

Placing original index.html.

It is good. Let's merge now!


AutoChunk

Hello, I was wondering whether AutoChunk described in https://arxiv.org/pdf/2203.00854v3.pdf is already implemented? Will this avoid manually setting the chunk_size?

Hi, autochunk was implemented in colossalAI, and it has not been added to this repo. So I'm afraid you still need to set it manually now.

@oahzxl How could AutoChunk be enabled manually from this repo?

Hi, I was curious about the inference overhead caused by using AutoChunk for protein prediction models , did it take some time to find the optimical chunk size？


Actions as functions in addition to strings and objects?

Bug or feature request?
Feature Request
Description:
Since functions are first-class citizens in JavaScript, and in the interest of reducing boilerplate, I suggest that function actions would be more ergonomic than strings or objects (in many cases).
(Feature) Potential implementation:

What the API would look like:

New Syntax:
const initTimer = seconds => () => {
  // use seconds to initiate a timer
}

const machine = Machine({
  initial: '1',
  states: {
    '1': {
      on: {
        timer: '2'
      },
      onEntry: initTimer(30)
    },
    '2': {
      on: {
        timer: '3'
      },
      onEntry: initTimer(45)
    },
    '3': {
      on: {
        timer: '1'
      },
      onEntry: initTimer(60)
    }
  }
})

Current Syntax:
const actionMap = {
  initTimer: ({ seconds }) => {
    // use seconds to initiate a timer
  }
}

const machine = Machine({
  initial: '1',
  states: {
    '1': {
      on: {
        timer: '2'
      },
      onEntry: { type: 'initTimer', seconds: 30 }
    },
    '2': {
      on: {
        timer: '3'
      },
      onEntry: { type: 'initTimer', seconds: 45 }
    },
    '3': {
      on: {
        timer: '1'
      },
      onEntry: { type: 'initTimer', seconds: 60 }
    }
  }
})

If this is a breaking change
I don't see this as a breaking change. Actions are already polymorphic (either string or object), and it's the user's responsibility to determine what type an action is and what to do with it / how to handle it. In effect, this is likely to be a documentation change plus a ts change to allow actions of type function. This would signal to users that actions can be functions and that this construction is specifically supported by project maintainers.

If this is part of the existing SCXML specification
It's a variation on the definition of actions in the SCXML spec.

Actions as functions will be supported in 3.3, and they're already in master 🎉


Unable to find a ReactModal as a section

SitePrism has been working great for my automation project until I needed to get a handle on a particular ReactModal object that works with straight capybara find command but not in SitePrism. I would really appreciate any help with this issue.
calling find in pry debugger with would work

find "div:nth-child(18) > div > div > div"
=> #<Capybara::Node::Element tag="div" path="/html/body/div[6]/div/div/div">
"div:nth-child(18) > div > div > div"
find "div:nth-child(18) > div > div > div"
=> #<Capybara::Node::Element tag="div" path="/html/body/div[6]/div/div/div">
[3] pry(#RSpec::Core::ExampleGroup::Nested_1)>

however calling SitePrism object @videos_page.clipping would not work.

@videos_page.clipper
ArgumentError: wrong number of arguments (given 2, expected 0)
from /Users/kpham/.rvm/gems/ruby-2.3.0@social/gems/site_prism-2.9/lib/site_prism/element_container.rb:28:in initialize'_ @videos_page.clipping _ArgumentError: wrong number of arguments (given 2, expected 0) from /Users/kpham/.rvm/gems/ruby-2.3.0@social/gems/site_prism-2.9/lib/site_prism/element_container.rb:28:in initialize'

class VideosPage <SitePrism::Page
  set_url "/videos"
  section :clipper, ClippingDialog, ".bc-dialog.bc-dialog-clipping"
  section :clipping, ClippingDialog, "div:nth-child(18) > div > div > div"

       **
**

Found the issue in section definition, cut and paste error.
class ClippingDialog <SitePrism::Page
should be:
class ClippingDialog <SitePrism::Section
This issue is resolved.


Feat/provider dashboard

Dashboard to show providers useful information

[x] Navigate the home page with provided information
[x] Add Provider basic information like CPU, memory, GPU, storage active, pending, and available resources
[x] Show provider is online or not
[x] Show recent provider actions
[x] Show live AKT price

Subsequent branch is merged successfully. Closing this PR


Add Onyx::SQL.transaction method

Onyx::SQL.transaction do |tx|
  Onyx::SQL.exec(foo) # Repo uses transaction connection
  tx.commit
end

Should expand to:
Onyx.db.transaction do |tx|
  Onyx::SQL.repo.db = tx.connection
  yield(tx)
  Onyx::SQL.repo.db = Onyx.db
end

Edit: updated with #16 proposals.

I'd say go one step further and auto-commit. We might need to add a way to cancel the transaction though:
Onyx::SQL.transaction do |tx|
  res = Onyx::SQL.exec(foo) # Repo uses transaction connection
  tx.cancel if res.something?
end

@aemadrid, makes sense. We could then check if tx is closed with closed? method and commit it if it's not closed yet.


Update pose.md (Missing a DOM element for LandmarkGrid)

In JavaScript Solution API demo, seems that it missed a DOM element for LandmarkGrid class to initialize.

Merged in https://github.com/google/mediapipe/commit/6abec128edd6d037e1a988605a59957c22f1e967.


Reinstalling krb5 and protoc on arm to fix some compile issues

Fix for krb5 and protoc for ARM processors.
Fix: Missing seperator broke pipeline in Makefile

Please don't merge this yet. I think I have a better solution here: https://github.com/stackabletech/secret-operator/pull/462

Closed as fixed


Configure travis

Along the same lines, I highly recommend https://greenkeeper.io/

@spudly Good idea, added #21 for that.

I added a .travis.yml. Still need to enable the project in travis, then add a badge to the README.


Memory leak

I noticed that destroy method not clearing up all the DOM event handlers, therefore there's a memory leak which is a serious issue for single page applications.
I set up an example, leaking DOM elements are shown in console.
https://www.dropbox.com/s/p9j6vn4e8t3nbkq/fotorama-leak.zip?dl=0

Got the same problem, hot decision – to .off() handlers from fotorama jQuery element implicitly like $('.fotorama').off()


kapp-controller Pod stuck in CLBO and will never recover once the kapp-controller-sidecarexec container is SIGKILL’ed

What steps did you take:
Over the uptime, noticed kapp-controller-sidecarexec is in CLBO due to /etc/kappctrl-mem-tmp/sidecarexec.sock: bind: address already in use.
I was able to reproduce the issue by sending a SIGKILL signal to the container using kill -9 <container pid>.
What happened:
The Pod stuck in CLBO and the package resource is not recognized.
root@422f0e147ceebf2c4b41fd0b86093bc2 [ ~ ]# kubectl get po -n vmware-system-appplatform-operator-system
NAME                                                    READY   STATUS             RESTARTS       AGE
kapp-controller-786f8cf789-pv5m7                        1/2     CrashLoopBackOff   3 (28s ago)    32m

root@422f0e147ceebf2c4b41fd0b86093bc2 [ ~ ]# kubectl logs -n vmware-system-appplatform-operator-system kapp-controller-786f8cf789-pv5m7 kapp-controller-sidecarexec
{"level":"info","ts":1663028728.5450194,"logger":"kc-sidecarexec","msg":"start sidecarexec","version":"0.38.4"}
{"level":"info","ts":1663028728.5464313,"logger":"kc-sidecarexec","msg":"starting zombie reaper"}
{"level":"error","ts":1663028728.5473244,"logger":"kc-sidecarexec","msg":"Serving RPC","error":"Listening RPC: listen unix /etc/kappctrl-mem-tmp/sidecarexec.sock: bind: address already in use","stacktrace":"runtime.main\n\truntime/proc.go:250"}

root@422f0e147ceebf2c4b41fd0b86093bc2 [ ~ ]# kubectl get packages -A
error: the server doesn't have a resource type "packages"

What did you expect:
I expect the kapp-controller Pod can auto recover without any manual steps.
Anything else you would like to add:

Initial analysis: the issue comes from emptyDir: kapp-controller-sidecarexec is using emptyDir Volume for the /etc/kappctrl-mem-tmp/sidecarexec.sock. Since emptyDir persists among container crashes, the socket will not be released after the crash. Then the socket cannot bind after kapp-controller-sidecarexec restarts, which cause the CLBO.
Various reasons can cause the container be SIGKILL'ed (OOMKilled error, delete without grace period, etc), this means any kapp-controller installation would hit this issue (sooner or later).
Manually restart the Pod can recover from the issue. But I still expect the Pod can recover without any manual stapes because the customers might not have the permissions for such solution on the cluster.

Environment:

kapp Controller version (execute kubectl get deployment -n kapp-controller kapp-controller -o yaml and the annotation is kbld.k14s.io/images): v0.38.4
Kubernetes version (use kubectl version): 1.23

Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.

Thanks for the followup. Remove the file can unblock from the issue, but I still expect the Pod to recover without any manual operations on the cluster since the customer may not have the permission for this kind of solutions on the cluster.
For example, one possible solution may be to delete the socket file if it exists before starting sidecar-exec listener?

this is addressed in v0.41.2


Adding minimal sphinx setup for docs.

Closes: #55

Is this tested? I am surprised there is no change in the dev dependencies of the project adding Sphinx 🤔

Is this tested? I am surprised there is no change in the dev dependencies of the project adding Sphinx 🤔 No value in merging if it's not building at least locally.

Fixed in 72001bb. Can now build docs successfully by going into the docs/ folder and running make html.
The docs are minimal, but the scaffolding is now there.

Please add instructions in the README#Contributing on how to build docs.

Good call. Added in f5ced7


Anurag filters

added two filters, also added them to filter select

Please remove the files in the Filter subfoilder


Placing in non axis aligned planning scence

Closes #11
Tested with mobipick_labs where one table is offset in x :
https://github.com/aprilprojecteu/grasplan/assets/49768113/61725fce-25bb-4194-8e3f-de926c272524

we tested on the real robot, works fine!


feat: Annotate the enum constructor field instead of the class

Currently usage:

More intuitive usage:

The compiler plugin will have to check if the class that is instantiated with the annotated field is an enum.

This doesn't really make sense, also it would introduce global state since I would have to make sure no duplicate FromValues are present on other fields. Not going to be doing this

This doesn't really make sense

Please elaborate

also it would introduce global state since I would have to make sure no duplicate FromValues are present on other fields.

This is an implementation difficulty and not a feature issue.

This is for matching and returning enum variants, and annotating a single field doesn't make sense since it's not based on that single field, the generated method is on the entire class

since it's not based on that single field.

The annotation wants you to specify a single field though because it generates the code around that field.

the generated method is on the entire class

Annotating a field does not prevent generating code using the class the field is in.
Annotating the field saves the user from issues like accidentally renaming the field without changing the name in the annotation. Additionally, annotating the field precisely shows that FromValue is generated by comparing the annotated field. Additionally, it simplifies usage because now you do not have to automatically default to the first field, which is an arbitrary decision that you can only guess, nor have to specify the field you want to match to get the correct enum variant as you'd be annotating the field directly.


Add nested virtualization step

If this PR needs approval, or if the commits need to be pulled into the private repo, contact @alkohli. Thanks.

#sign-off


Low level information(input information) is getting outputted as an  intermediate representation

Hi All,
I need one clarification as I am not sure whether the result I am getting is write or wrong.
I have written similar code(DivisionByZeroPass) in my environment and tested and found some irregularities.  Therefore, I am looking for suggestion.
(https://github.com/qir-alliance/qat/tree/main/qir/qat/Passes/DivisionByZeroPass)
My input ll(low level) is as below
-----------------input file------------------
; entry point definition
define i64 @Entry_Point_Name() #0 {
entry:
%0 = sdiv i64 10, 0
br label %exit_block
exit_block:               ; preds = %entry
ret i64 0
}
---------------------------end of input file---------------------
After running my binary (DivisionByZeroPass), I am getting below output
-----------------output information---------------------------
@qirerror_code = internal global i64 0
define i64 @Entry_Point_Name() {
entry:
br i1 true, label %if_denominator_is_zero, label %after_zero_check
if_denominator_is_zero:                           ; preds = %entry
%0 = load i64, i64* @qirerror_code, align 4
%1 = icmp eq i64 %0, 0
br i1 %1, label %if_ecc_not_set, label %ecc_set_finally
if_ecc_not_set:                                   ; preds = %if_denominator_is_zero
store i64 1100, i64* @qirerror_code, align 4
br label %ecc_set_finally
ecc_set_finally:                                  ; preds = %if_denominator_is_zero, %if_ecc_not_set
br label %after_zero_check
after_zero_check:                                 ; preds = %entry, %ecc_set_finally
%2 = sdiv i64 10, 0
br label %exit_block
exit_block:                                       ; preds = %after_zero_check
ret i64 0
}
------------------------------------------end of output-----------------
Question: Should QIR  print again ( %2 = sdiv i64 10, 0 ) after_zero_check block ? In general we don’t print input information in intermediate representation.
I need suggestion from the community whether my understanding is write or wrong. What should I be doing in this case?
I am looking forward to have either discussion or suggestion.
Thanks & Regards,
Nitish

Glad to see you trying out code from the repo, @kumarnitish10m! I think there may be some confusion about what the purpose of the DivideByZero pass is and how it's expected to work. First off, it's part of the set of experimental passes, so should be considered prototype and not finalized. Currently, nothing uses this pass in any production scenarios that I'm aware of. The idea behind it was not to enable logic that skips the division, but rather add a check that ensures an error code gets set just before division takes place. At the time this code was first developed, the quantum systems we were targeting did not have any capability to halt an execution due to error and would always run the full program. As a result, the control systems would not exactly fail when dividing by zero but instead just produce an invalid result. The idea was to have a pass that injected code to check the division before it ran so that failure cases could be marked by an error code, and then fallthrough to the normal program execution afterward. That is the injected code you see:
br i1 true, label %if_denominator_is_zero, label %after_zero_check

if_denominator_is_zero: ; preds = %entry
%0 = load i64, i64* @qirerror_code, align 4
%1 = icmp eq i64 %0, 0
br i1 %1, label %if_ecc_not_set, label %ecc_set_finally

if_ecc_not_set: ; preds = %if_denominator_is_zero
store i64 1100, i64* @qirerror_code, align 4
br label %ecc_set_finally

ecc_set_finally: ; preds = %if_denominator_is_zero, %if_ecc_not_set
br label %after_zero_check

It loads the global error value, and if no error code was already set, it will set one (the value 1100). The first branch uses a hard-coded true because in this case constant folding has turned the check of the divisor value constant 0 into true. Finally, the execution branches to %after_zero_check which is the continuation of the original code:
after_zero_check: ; preds = %entry, %ecc_set_finally
%2 = sdiv i64 10, 0
br label %exit_block

exit_block: ; preds = %after_zero_check
ret i64 0

And that is why you see the same instruction as in the input program here. So for now, the transformation pass is behaving as expected, though perhaps not as you were hoping it would.


Need example for snapshot dependency pipelines

This would be helpful to me as well. I'm not sure where to start.


Add tests for TOML formatting style

As mentioned in PR #112, it'd be good to add a check to see that the default format more-or-less matches typical formatting styles used in the setuptools documentation; notably fields like license and authors use the inline table format where possible, as this is the style generally used in setuptools documentation.

(I edited in a space, otherwise it doesn't autolink the PR)


sdhc: sdhc_spi: compile-time determine if sdhc_ones needed

Move the overrun-character property from the common Nordic SPI binding to the spi-controller base binding. This gives users of the SPI interface a way to query what the default value is at compile-time, and potentially avoid allocation of large constant buffers.
Expose the new common property overrun-character from the devicetree nodes, falling back to the SPI_MOSI_OVERRUN_UNKNOWN value.
Use the new SPI_MOSI_OVERRUN_DT macro to determine at compile-time whether the 512 byte array of sdhc_ones is required.
This PR does not attempt to peruse datasheets to determine the default MOSI values clocked out by the dozens of SPI drivers in tree, only to make it trivial for contributors to expose that information in the future.

I wonder if it would make more sense to support setting this property at runtime? Just musing here, but is this a fixed value on the nordic controller or a configurable setting? If it is configurable perhaps we make it possible to set that at runtime.

It is a configurable setting but currently it is a constant from devicetree. I'm not sure what value could be derived from making it configurable at runtime. It doesn't seem like a common option among SoC vendors, and if you want a specific value you can always do what was done here with sdhc_ones.
The value as a compile-time constant is that you can do what this PR does and optimize out large constant arrays if the value matches the value you want.
In short, if it is a runtime parameter, this PR is impossible.

The value as a compile-time constant is that you can do what this PR does and optimize out large constant arrays if the value matches the value you want.

In short, if it is a runtime parameter, this PR is impossible.

Yes, this is a good point. Let's keep it as devicetree then


Populate nested fields

As title, have any way to config populate fields in object item of sub array?
Example
settings: {
  fields: {
    arrayField: {
      type: 'array',
      items: {
        type: 'object',
        props: {
          normalField: { type: 'string' },
          needPopulatedField: { type: 'object', virtual: true, populate() {} }
        }
      }
    }
  }
}

I didn't test it, but maybe it can work.


Revert "Manage security level"

Reverts SoftEtherVPN/SoftEtherVPN#1116

Please document the reason for the revert in the commit message. As it has been merged already, please document the reason in the comment.


stop an app deployed to mvm

Fixes #453
In progress. Functionality works, just needs some cleanup.

@patflynn @chanseokoh @meltsufin, you guys can start taking a look at this

Updated with comments so far.
Moved all credential checking to the superclass.

From the UX point of view, I find it a little odd how when you click the undeploy button, the module just instantly disappears and there is no confirmation that the undeployment was successful. Contrast that with the deploy action which takes a while, and you see the process happening in the console. I think it would be nice to bring up a popup confirming the success of the action.

I agree. Or instead of a popup if we could get the console output to remain visible showing some success message indicating that the app was undeployed.

Yes, either that, or maybe we can even hook into the IJ Event Log somehow? Right now it only seems to report log.error messages in the Event Log.

The event log doesn't feel like the right place for a success message. Ideally it would be in the console view but this doesn't look possible because of how IJ deletes the deployment after a successful undeploy (and the console goes away with it). I'm exploring using a dialog here.

@meltsufin I added a success dialog to the stop process. Let me know what you think.

Maybe it then also makes sense to have a similar dialog for completion of deployment as well?

Yea. I think so.

Added successful deployment dialog
Added an undeployment confirmation dialog. Before, the application stop was immediately executed when clicking the button. Now the user can cancel out of it.

Comments addressed.
I left the undeployment success info dialog since I'm on the fence about it. Without it, the user has no indication that the stop was successful.

LGTM

LGTM>


[tensor] bug fix for the sum

add bug fix for the sum of tensors
Self evaluation:

Build test: [x]Passed [ ]Failed [ ]Skipped
Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Parichay Kapoor<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.4.20191203. Thank you for submitting PR #497. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnsuite.mooo.com/.

:octocat: cibot: @kparichay, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to https://github.com/nnstreamer/nntrainer/wiki/.


NPM package

Hello guys,
Could you make a npm package to be able to import it correctly ?
Thanks a lot !

Hi Anthony,
Thanks for reaching out.
I haven't paid much attention to this repository in quite some time since Pure wasn't being actively maintained anymore. Instead, I've been focusing most of my attention on my own css framework Hydrogen.
I have no problem obliging to this request, and will do so at my earliest convenience in the next few weeks.
Thanks for your support.

@anthonyvialleton Thanks so much for your patience and patronage. I've added full 24th and 5th support to the push-pull and flex-grid and converted the project to a pure npm solution.
You can find officially use this as an npm package by running:
npm i purecss-utils


Fractal Cubits For List

please complete these information first.

and please check your code then fix the error.

@fractalcubits

hi, the website link should be the twitter link.
It seems this collection doesn't have a community. And sorry that we don't accept personal collection at present. @fractalcubits


Support Docker VOLUME for notebook files and secret store entries.

Ticket #51 investigated how to store the Notebooks persistent, in case of Docker Container removal, resulting in the proposal to use Docker VOLUMES for notebook files and secret store entries.
The current idea is to support 2 scenarios

S1) AI-Lab manages the data anonymously and encapsulated
S2) user (partially) modifies the data, keeps a copy of the data and provides the data when using the AI-Lab

Following the results of ticket #51:

By default, Ai-Lab will create an anonymous Docker Volume and mount it to $MOUNT inside the Docker Container, which implements scenario S1.
For scenario S2

The user

Creates an empty Docker Volume
mounts the empty volume to $MOUNT when starting the Docker Container

On Container start

Ai_lab will call entrypoint.py (as always)
entrypoint.py copies the data from $BACKUP to $MOUNT
hence, into the user's Docker volume, which is empty at that point in time

If the user runs the Container again

User again mounts their volume to $MOUNT
The volume is no longer empty but contains the files copied from $BACKUP
Additionally, the user may have modified the files in the last session
Docker will not overwrite or add any files in $MOUNT as the experiments in ticket #51 showed.

The current ticket therefore requests to

[ ] add a VOLUME directive to Dockerfile
[ ] document the usage so that end users can choose between scenario S1 and S2

Duplicates #78


Add mutating methods to BigInt

As discussed here.
This adds mutating versions of:

unary - -> neg!
- -> sub!
+ -> add!
* -> mul!
abs -> abs!
factorial -> factorial!
** -> pow!
fdiv -> fdiv!
tdiv -> tdiv!
unsafe_floored_div -> unsafe_floored_div!
unsafe_truncated_div -> unsafe_truncated_div!
% -> mod!
remainder -> remainder!
unsafe_floored_mod -> unsafe_floored_mod!
unsafe_truncated_mod -> unsafe_truncated_mod!
unary ~ -> com! (edit: renamed to complement!)
& -> and!
| -> or!
^ -> xor!
>> -> rshift!
<< -> lshift!

Thank you for this!
When I started implementing this I found out that you can't do operations with exactly the same value. For example try this:
require "big"

big = BigInt.new(2)
big.add!(big)

p big

It will print garbage.
The way to handle it, in the case of add!, is to do something like this:
    if @mpz == other.@mpz
      mul!(2)

Well, maybe there's a more efficient way... maybe creating a new BigInt instance and then adding that to self, I'm not sure.
The annoying this is that you'll probably need to handle this in every operation :-(

Wow what an eye to notice that. Maybe it's a memmove/memcpy issue on their part.
I'll see what I can do.

I added checks for:
add!
sub!
mul!
unsafe_floored_div!
unsafe_truncated_div!
unsafe_floored_mod!
unsafe_truncated_mod!
and!, or! and xor! didn't seem to have that problem.
Someone with decent math skills should check the workarounds.

I just benchmarked add!, sub! and mul! against the non-mutating versions and in all three cases the mutating version was slightly slower than the non-mutating one for whatever reason, even without the extra checks. It might not be worth it.

@Exilor Strange! Here's a benchmark I just did:
require "big"
require "benchmark"

Benchmark.ips do |x|
  x.report("non-mutating") do
    a = 1.to_big_i
    b = 1.to_big_i
    100_000.times do
      a += b
    end
  end
  x.report("mutating") do
    a = 1.to_big_i
    b = 1.to_big_i
    100_000.times do
      a.add!(b)
    end
  end
end

Results:
non-mutating 318.17  (  3.14ms) (± 5.18%)  3.05MB/op   4.41× slower
    mutating   1.40k (713.26µs) (± 4.70%)   64.0B/op        fastest

You can operate on the same BigInt in all arguments:
x = 5.to_big_i
LibGMP.add(x, x, x)
x # => 10

It is the following that breaks:
x = 5.to_big_i
y = x
LibGMP.add(x, x, y)
x # garbage

It is the following that breaks

Wow, that's surprising! Do you know why? And how we could detect that case?

This is a known GMP issue:

For both behavior and efficiency reasons, it is discouraged to make copies of the GMP object itself (either directly or via aggregate objects containing such GMP objects). If copies are done, all of them must be used read-only; using a copy as the output of some function will invalidate all the other copies.

Also, if BigInt has mutable reference semantics, #clone must not be a no-op:
lib LibGMP
  fun set = __gmpz_set(rop : MPZ*, op : MPZ*)
end

struct BigInt
  def clone
    BigInt.new { |mpz| LibGMP.set(mpz, self) }
  end
end


SWARM-1305 add wildfly-nosql integration + NoSQL fractions

[ ] Have you followed the guidelines in our Contributing document?
[ ] Have you created a JIRA and used it in the commit message?
[ ] Have you checked to ensure there aren't other open Pull Requests for the same issue?
[ ] Have you built the project locally prior to submission with mvn clean install?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

add to whitelist

looks like I missed a reference to org.wildfly.nosql:wildfly-cassandra-feature-pack:zip:1.0.0.Alpha1-SNAPSHOT

looks like the -Pnosql profile in the root pom.xml is not correct yet, as I didn't expect the NoSQL tests to run on CI but they did (which fail, since we don't yet have NoSQL DBs via Kube or Docker).

A lot of code duplication in the fractions.

There is very little code in the fractions, most of the code is generated in the nosql-config-api classes, which the fractions extend.  I'm not sure that I understand what you mean about there being a lot of code duplication in the fractions.
There is also more code in the underlying NoSQL subsystems (http://github.com/wildfly/wildfly-nosql/).

The *Fraction and *Customizer classes probably can't be shared (and are fairly small), but the *DriverInfo and Messages classes look all almost the same and a lot of code could IMHO be shared there.

Updated the *DriverInfo + Messages classes to use a common org.wildfly.swarm.container.util.DriverModuleBuilder class that is shared.  Perhaps datasource DriverInfo could use DriverModuleBuilder as well, at some point.

Still need to update the tests to use project-defaults.yml (after figuring out the OutboundSocketBinding part)

For the project-defaults.yml, I'm not yet sure of the best way to handle the OutboundSocketBinding part.  In theory, we could have a single NoSQL server configuration option that helps our NoSQL unit tests to use a projects-defaults.yml (e.g. similar to EnhancedSMTPServer supporting "swarm.mail.smtp.host" + "swarm.mail.smtp.port"), however, for multiple NoSQL server host/port pairs, we would need more than that, to support projects-defaults.yml for NoSQL.
What kind of Swarm class should I try to use, to solve adding multiple host/port pairs via OutboundSocketBinding in projects-defaults.yml?  Would a OutboundSocketBinding fraction help with that?  Or something else?

I'm not sure that a fraction would work, since the outbound socket binding in WildFly doesn't appear to be represented as a subsystem, instead the DMR representation is available via something like (from jboss-cli):
ls /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding
casstesthost    mail-smtp       mongotesthost   neo4jtesthost   orienttesthost
ls /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mongotesthost
fixed-source-port=false     host=localhost   port=27017   source-interface=undefined  source-port=undefined

I think a generic OutboundSocketBindingCustomizer in :container might work, fed by some @Configurable Map<> or information maybe.  We have a fair bit of plumbing in place, but just maybe lacking the YAML to SocketBinding bits.
e.g., we already have a datastructure for them and the capability of marshalling them:
https://github.com/wildfly-swarm/wildfly-swarm/blob/master/core/container/src/main/java/org/wildfly/swarm/container/runtime/marshal/SocketBindingGroupMarshaller.java
Just currently no real way to create new instances from the YAML as CDI-produced beans.

I should squash these commits into one after they are reviewed :)

I'd rather review the squash personally.
On Fri, Jul 7, 2017 at 4:33 PM Scott Marlow<EMAIL_ADDRESS>wrote:

I should squash these commits into one after they are reviewed :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/wildfly-swarm/wildfly-swarm/pull/547#issuecomment-313786203,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXdF9_mzegFmSl6ZP-p05VGa7--xJCSkks5sLpYLgaJpZM4N_-BJ
.

need to remove unused imports from the tests.

Unused imports were removed from tests. :)


How to use http in v1.0.0-beta.11-webpack.8  version

I initially tested and wrote a tutorial for Pluralsight by using the version 1.0.0-beta.9.
However, I've tried today with the latest version and for the life of me I can't figure out how to use http to call some service. Is there maybe some example that you can share please?

Additional info:

OS
Mac OSX (El Capitan - 10.11.4)

Versions:
angular-cli: 1.0.0-beta.14
node: 4.4.2
os: darwin x64

Repro steps: Tried various ways and tuts to inject http but to no avail.

I'm not like looking for some hand-holding or something, am just looking for help to get going in the right direction.
Above all, thank you for this awesome project!

The issue tracker is for bugs and feature requests in Angular CLI. Please consider posting a question on StackOverflow for these types of support requests.  You can find some Angular 2 HTTP documentation here.

Ok, I figured what was the issue, so I may as well explain it here if someone else stumbles upon this issue themselves.
So, when I installed angular-cli with npm install -g angular-cli I haven't at first noticed this error:
UNMET PEER DEPENDENCY<EMAIL_ADDRESS>What I ended up doing now was npm install webpack -g && npm install webpack --save-dev and now I can normally include Http into my component like this: import { Http, Response } from '@angular/http'; and then use it within a class like this:
import { Component } from '@angular/core';
import { Http, Response } from '@angular/http';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app works!';

  constructor(private http: Http){
  	let link = 'http://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&q=';
		let apiLink = link + 'cats';

		this.http.request(apiLink).subscribe((res: Response) => {
			console.log(res.json());
		});
  }

}

Hope this helps someone.


Create dbuas.txt

Added main domain of Digital Business University of Applied Sciences (Berlin)

@hadiasghari First stage of verification passed, official domain is dbuas.de as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@hadiasghari Pull request merged. Thank you.


WIP: Add a POC of an alternate partitioning scheme

I haven't yet written this up properly (or added any code for it), but I wanted to push something out there with my thoughts around how to support partitioning in a more compact way.
Below is the (incomplete) YAML for what one A100 GPU with MIG disabled, one A100 with MIG enabled, and one H100 GPU (regardless of MIG mode) would look like. I am currently only showing the full GPUs and the 1g.*gb devices (because I wrote this by hand), but you can imagine how it would be expanded with the rest.
Most of it is self-explanatory, except for 1 thing -- what the new sharedCapacityInstances field on a device implies. It is a way to define a "boundary" for any shared capacity referenced in a device template. Meaning that all devices that provide the same mappings for a given sharedCapacityInstance will  pull from the same SharedCapacity.
I will add more details soon (as well as a full prototype), but I wanted to get this out for initial comments before then.
sharedAttributeGroups:
- name: common-attributes
  attributes:
  - name: brand
    string: Nvidia
  - name: cuda-compute-capability
    version: 8.0.0
  - name: driver-version
    version: 550.54.15
  - name: cuda-driver-version
    version: 12.4.0

- name: a100-common-attributes
  attributes:
  - name: product-name
    string: Mock NVIDIA A100-SXM4-40GB
  - name: architecture
    string: Ampere

- name: h100-common-attributes
  attributes:
  - name: product-name
    string: Mock NVIDIA H100-SXM4-80GB
  - name: architecture
    string: Hopper

- name: gpu-0-common-attributes
  attributes:
  - name "k8s.io/pcie-root"
    string "pci_0"

- name: gpu-1-common-attributes
  attributes:
  - name "k8s.io/pcie-root"
    string "pci_1"

- name: gpu-2-common-attributes
  attributes:
  - name "k8s.io/pcie-root"
    string "pci_2"

sharedCapacityTemplates:
- name: a100-shared-resources
  capacities:
  - name: multiprocessors
    quantity: "98"
  - name: copy-engines
    quantity: "7"
  - name: decoders
    quantity: "5"
  - name: encoders
    quantity: "0"
  - name: jpeg-engines
    quantity: "1"
  - name: ofa-engines
    quantity: "1"
  - name: memory-slices
    intRange: 0-7

- name: h100-shared-resources
  capacities:
  - name: multiprocessors
    quantity: "132"
  - name: copy-engines
    quantity: "8"
  - name: decoders
    quantity: "7"
  - name: encoders
    quantity: "0"
  - name: jpeg-engines
    quantity: "7"
  - name: ofa-engines
    quantity: "1"
  - name: memory-slices
    intRange: 0-7

deviceTemplates:
- name: a100-whole-gpu
  sharedAttributeGroups:
  - common-attributes
  - a100-common-attributes
  attributes:
  - name: memory
    quantity: 40Gi
  - name: mig-capable
    bool: true
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: multiprocessors
      quantity: "98"
    - name: copy-engines
      quantity: "7"
    - name: decoders
      quantity: "5"
    - name: encoders
      quantity: "0"
    - name: jpeg-engines
      quantity: "1"
    - name: ofa-engines
      quantity: "1"
    - name: memory-slices
      intRange: 0-7

- name: h100-whole-gpu
  sharedAttributeGroups:
  - common-attributes
  - h100-common-attributes
  attributes:
  - name: memory
    quantity: 80Gi
  - name: mig-capable
    bool: true
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: multiprocessors
      quantity: "132"
    - name: copy-engines
      quantity: "8"
    - name: decoders
      quantity: "7"
    - name: encoders
      quantity: "0"
    - name: jpeg-engines
      quantity: "7"
    - name: ofa-engines
      quantity: "1"
    - name: memory-slices
      intRange: 0-7

- name: a100-mig-1g.5gb-base
  sharedAttributeGroups:
  - common-attributes
  - a100-common-attributes
  attributes:
  - name: mig-profile
    string: 1g.5gb
  - name: memory
    quantity: 4864Mi
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: multiprocessors
      quantity: "14"
    - name: copy-engines
      quantity: "1"
    - name: decoders
      quantity: "0"
    - name: encoders
      quantity: "0"
    - name: jpeg-engines
      quantity: "0"
    - name: ofa-engines
      quantity: "0"

- name: h100-mig-1g.10gb-base
  sharedAttributeGroups:
  - common-attributes
  - h100-common-attributes
  attributes:
  - name: mig-profile
    string: 1g.10gb
  - name: memory
    quantity: 9728Mi
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: multiprocessors
      quantity: "16"
    - name: copy-engines
      quantity: "1"
    - name: decoders
      quantity: "1"
    - name: encoders
      quantity: "0"
    - name: jpeg-engines
      quantity: "1"
    - name: ofa-engines
      quantity: "0"

- name: a100-mig-1g.5gb-0
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "0"

- name: a100-mig-1g.5gb-1
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "1"

- name: a100-mig-1g.5gb-2
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "2"

- name: a100-mig-1g.5gb-3
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "3"

- name: a100-mig-1g.5gb-4
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "4"

- name: a100-mig-1g.5gb-5
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "5"

- name: a100-mig-1g.5gb-6
  deviceTemplateName: a100-mig-1g.5gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: a100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "6"

- name: h100-mig-1g.10gb-0
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "0"

- name: h100-mig-1g.10gb-1
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "1"

- name: h100-mig-1g.10gb-2
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "2"

- name: h100-mig-1g.10gb-3
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "3"

- name: h100-mig-1g.10gb-4
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "4"

- name: h100-mig-1g.10gb-5
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "5"

- name: h100-mig-1g.10gb-6
  deviceTemplateName: h100-mig-1g.10gb-base
  sharedCapacitiesConsumed:
  - sharedCapacityTemplateName: h100-shared-resources
    capacities:
    - name: memory-slices
      intRange: "6"

devices:
# GPU 0 is an A100 with MIG disabled so is only advertised as a full GPU
- name: gpu-0
  deviceTemplateName: a100-whole-gpu
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-0
  sharedAttributeGroups:
  - gpu-0-common-attributes
  attributes:
  - name: index
    string: "0"
  - name: minor
    string: "0"
  - name: uuid
    string: GPU-0eaad900-5263-4fd6-b020-f03d30efac31

# GPU 1 is an A100 with MIG enabled so is only advertised as its full set of MIG devices
- name: gpu-1-mig-1g.5gb-0
  deviceTemplateName: a100-mig-1g.5gb-0
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-1
  deviceTemplateName: a100-mig-1g.5gb-1
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-2
  deviceTemplateName: a100-mig-1g.5gb-2
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-3
  deviceTemplateName: a100-mig-1g.5gb-3
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-4
  deviceTemplateName: a100-mig-1g.5gb-4
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-5
  deviceTemplateName: a100-mig-1g.5gb-5
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

- name: gpu-1-mig-1g.5gb-6
  deviceTemplateName: a100-mig-1g.5gb-6
  sharedCapacityInstances:
  - templateName: a100-shared-resources
    instanceName: gpu-1
  sharedAttributeGroups:
  - gpu-1-common-attributes
  attributes:
  - name: parentIndex
    string: "1"

# GPU 2 is an H100 and advertises both its full GPU and all of its MIG devices
- name: gpu-2
  deviceTemplateName: h100-whole-gpu
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: index
    string: "2"
  - name: minor
    string: "2"
  - name: uuid
    string: GPU-4404041a-04cf-1ccf-9e70-f139a9b1e23c

- name: gpu-2-mig-1g.10gb-0
  deviceTemplateName: h100-mig-1g.10gb-0
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: index
    string: "2:0"
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-1
  deviceTemplateName: h100-mig-1g.10gb-1
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-2
  deviceTemplateName: h100-mig-1g.10gb-2
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-3
  deviceTemplateName: h100-mig-1g.10gb-3
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-4
  deviceTemplateName: h100-mig-1g.10gb-4
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-5
  deviceTemplateName: h100-mig-1g.10gb-5
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

- name: gpu-2-mig-1g.10gb-6
  deviceTemplateName: h100-mig-1g.10gb-6
  sharedCapacityInstances:
  - templateName: h100-shared-resources
    instanceName: gpu-2
  sharedAttributeGroups:
  - gpu-2-common-attributes
  attributes:
  - name: parentIndex
    string: "2"

In putting this together, it's become obvious that alot of what is being "templated" would be repeated in each and every slice. Would it be possible to create a separate API server object to hold the "template" objects for a given driver that can then be referenced by its resource slices? Possibly even leveraging a config map to do it instead of defining a new type.

In putting this together, it's become obvious that alot of what is being "templated" would be repeated in each and every slice. Would it be possible to create a separate API server object to hold the "template" objects for a given driver that can then be referenced by its resource slices? Possibly even leveraging a config map to do it instead of defining a new type.

Certainly it's possible, the question is whether it is worth the complexity, since then you have another independent object that can change or be missing, etc. This would help for any of the options 2, 4+ actually.
One thing we may want to think about is which factors drive scale and which are likely to grow over time, fastest:

individual partition shapes/templates (Ps)- if we think GPU sizes / memory blocks are going to increase dramatically, this number will increase
number of partitions per physical device (Ppd)- similarly, this will increase even more as memory blocks increase
number of physical devices per node (Dpn) - I expect this will stay around 8-16 for quite some time, WDYT?
number of nodes (N) - varies per cluster, but we should think O(10,000) at least, if not 10x that in the long run based on historical trends
number of slices per node (Spn) - depends on the particular slice size and specific slice design choices

We can characterize each suggestion then based on which of these scaling factors are relevant:

All options scale linearly with N (holding others fixed), but suggestions like the one quoted above can reduce the scale constant for some of the options. Nonetheless, for now let's think per node.
Options 1 and 3 on a per node basis scale O(Ppd * Dpn)
Option 2 puts some common attributes into the slice, so on a per-node basis, it splits the growth into two functions:

O(Spn) for the factored out common attributes
O(Ppd * Dpn) for the rest

Option 4 puts common attributes and partition map into the slice once, so it has two parts as well:

O(Spn * Ppd) for the device shape
O(Dpn) for the rest

Option 5 (yuck) shifts this to:

O(Spn * Ps) - I suspect that Ps = O(log Ppd) so this is an improvement, to basically O(Spn * log Ppd)
O(Dpn) for the rest

Option 6 (this option) shifts this to:

O(Spn * Ps) - since you list each partition shape
O(Ppd * Dpn) - since you explicitly list each device partition

The suggestion above would change these (on a per node basis):

Option 2 would stay O(Spn) for the common attributes but the scaling factor would change
Option 4 would become O(Spn) for the device shape since it would just be a constant reference
Option 5 would become O(Spn) for the device shape
Option 6 would become O(Spn) for the templates

Setting that aside, going back to the options without that suggestion, it would be possible to merge options 4 and 6 (option "10"...no, better stick with 7), such that: 1) We capture each partition shape once like in option 6; 2) Implicitly generate partitions like in option 4. If we did that, we would have:

O(Spn * Ps) for the shapes/templates
O(Dpn) - for the rest

which seems like the best we can do while keeping the repeated items in the slice.

Thinking more, I really do think that the things that will likely increase the most in the next 3-5 years are:

Partition shapes
Partitions per device
Number of nodes

This means that factoring out things that are duplicated per slice is a good idea, as number of slices will increase with N. Not only that, but if the "front matter" - the duplicated things like shapes/templates - increase in size, we leave less and less space for the actual devices. This causes an increase in slices per node!
This makes me think our best bet is going to be:

A resource that captures device/partition shapes/templates. The size and/or number of these will grow O(Ps * Ppd), but NOT with N.
The slice resource that references that resource for shapes. This pulls the "front matter" to a small constant (relative to Ps and Ppd). Thus, the total for this becomes O(N * Spn * Dpn). Since we expect Dpn to be relatively fixed, and since we moved all the "growth" out of the slice, Spn will also be fixed, so this is effectively O(N), which is really the best we can do.

I hadn't put the numbers together, but your conclusion at the end is where my head was when suggesting this. There will still need to be some per-slice "template" data (e.g. the pcie-root attributes from my example), but it would be info that is relevant just to the devices in the slice, so it actually lives in the appropriate place.

I picture one "front matter" object per GPU type which defines everything that is non-node-specific. And then each device in a resource slice has fields that point to a specific "front matter" object and then pull bits and pieces from it as appropriate.

Simple devices can still be just a named list of attributes, but if you want anything more sophisticated you have to start using this more complex structure.

I picture one "front matter" object per GPU type which defines everything that is non-node-specific. And then each device in a resource slice has fields that point to a specific "front matter" object and then pull bits and pieces from it as appropriate.

Yes, that's what I am thinking too. Basically push the invariant stuff across nodes into a separate object, and then refer to it. Those "front matter" pieces are probably constant for a given combination of hardware, firmware and driver versions.

FYI I added this as "Option 6" as well as the "Option 7" here: https://github.com/kubernetes-sigs/wg-device-management/issues/20#issuecomment-2168189769

In relation to what came up in the call tonight ...
Instead of having a single centralized object with all of the "front matter", we could have have one "front matter" object per node that all of the slices for that node refer to. It would likely have redundant information to most other nodes, but then we at least keep the front-matter separate from the resource slices that consume it (and if a driver does want to go through the headache of centralizing it, they still can).


removed unchecked casts and moved common method to base class

fixing issue AGPUSH-1244

:eyes: at it

:+1:

Thanks, landed in master!


Issues with USB communication on AMD AM4 Mainboard (X370 + Ryzen)

Hi David,
Now this is the kind of issue nobody wants to read on his own project's bugtracker because there's not much more to be done than reading, shrugging and sighing. ;-)
With best intentions I tried to run FluxEngine on my AMD Ryzen box (ASUS Prime X370-PRO, Ryzen 1700, Nvidia GTX 1060). I had issues whenever USB bulk transfer is required. I tried different USB cables and different USB ports.

fluxengine command displays help normal.
fluxengine rpm command runs normal.
fluxengine read ibm results either in "USB underrun" or "Error: bad USB reply"
fluxengine testbulktransport returns as last line: "Error: data transfer corrupted"

Error messages are copied from Linux on the box, but beware:
On this box I have Ubuntu 18.04 amd64 and I also have Windows 10 64bit. So I was able to test the FluxEngine on both OSses. That's why I think the issue is related to my hardware or my hardware configurations (have to check UEFI settings).
The same FluxEngine works fine on my Lenovo Notebook with Windows 10. On The notebook I get 750 KB/s according to fluxengine testbulktransport.
On the problematic X370 box I only seem to get 600-670KB/s.
I'm not asking for a solution, I just wanted to document that I have a problem here. Maybe in a week's time I will stumble across the solution - then I will document it here.
On Linux the FluxEngine is compiled locally, on Windows I used the latest experimental binary.
Dmesg on Linux shows me:
[    1.420892] usb 3-2: new full-speed USB device number 2 using xhci_hcd
[    1.839696] usb 3-2: New USB device found, idVendor=1209, idProduct=6e00, bcdDevice= 0.01
[    1.839698] usb 3-2: New USB device strings: Mfr=2, Product=1, SerialNumber=128
[    1.839699] usb 3-2: Product: FluxEngine
[    1.839700] usb 3-2: Manufacturer: Cowlark Technologies
[    1.839701] usb 3-2: SerialNumber: xxxxxxxxxxxxxxxxxxxxxx

On Linux, I also tried to update libusb-1.0.0 packages to more recent versions. Syslog and dmesg don't show any obvious thing. All I can see while I'm issueing FluxEngine  commands is:
Aug 22 19:19:37 ryzentux upowerd[1386]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.2/0000:03:04.0/0000:07:00.0/usb3/3-2/3-2:1.0
Aug 22 19:19:39 ryzentux upowerd[1386]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:01.3/0000:02:00.2/0000:03:04.0/0000:07:00.0/usb3/3-2/3-2:1.0

But the issue also occurs on Windows 10.
My current ideas are:

It could be related to USB power management of my system or maybe related to several different USB chips I have on my mainboard.
Electric problem due to floppy being powered by PSU of the box and also connected to box via USB.

At least some of this is a duplicate of #100, but that's really a symptom, not a cause.
testbulktransfer reporting corrupted data is extremely problematic, as USB transfers should be reliable. The bandwidth is low, too. My gut says that there could be something wrong with the USB setup, but my gut also says that The Flash is worth watching, so...
I see that you've tried different cables. Have you tried a powered hub? Is the FluxEngine itself running from the FDD power supply? Do you still get problems with testbulktransfer if the FluxEngine is not powered from the FDD power supply (and with the FDD disconnected)?

Just dumping some brainstorming stuff related to my AMD Ryzen 1700 + USB kernel driver issues. As a first step will just try to turn IOMMU off to check if it improves the situation at all.
Getting:
xhci_hcd 0000:07:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Leads me to:

https://bugzilla.kernel.org/show_bug.cgi?id=202541
https://github.com/ZerBea/hcxdumptool/issues/42
https://bugzilla.kernel.org/show_bug.cgi?id=202241

Good news:

Problem on Linux solved by putting a cheap USB 2.0 Hub in-between FluxEngine and the PC. Some would call it a workaround. I just sigh.
Problem on Windows 10 probably solved by installing AMD Chipset Drivers which will replace the standard Windows 10 USB drivers. If it works I will not reopen this ticket.


RL model trained on every condition image or on a dataset

I'm interested in the condition control part implemented by RL, but I got a confusion about the RL training. Does the training of RL on a set of training data or just one image online? From what I saw in the code, the agent was initialized without loading trained parameters and calling update method for every step which seems odd to me and found no description in both the paper and implementation materials. Looking forward to your thoughts, thx!

Hi, I'm so glad you asked this question. The RL model is trained on every condition image. Training one RL model applying for all condition images is too difficult. And it only takes seconds to train a RL model for one image, so I just chose the simple way. I also tried other optimization algorithms like GA and BO, in my experience, RL is better and faster. If you have better solutions or thoughts, I would greatly appreciate discussing them! Thank You!